Open vegetabill opened 7 years ago
I added my own form children like this to include the CSRF token but it didn't end up in the page markup.
<FileUpload options={fileUploadOptions}>
<a ref="chooseAndUpload">
Edit Photo
</a>
<input name="authenticity_token" type="hidden" value={this.context.csrfToken} />
</FileUpload>
I wanted to use this component for a mobile website and we wanted to support older Android browsers.
Currently, the implementation is too specific to checking for IE. If possible, please use feature detection instead so that old non-IE browsers will get the fallback form implementation.
I also need the fallback form to render the paramAddToField fields as hidden fields so that the Rails CSRF token is included, otherwise the request will be rejected.