Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compatibility for non-IE browsers #29

Open
vegetabill opened this issue Dec 28, 2016 · 1 comment
Open

Backwards compatibility for non-IE browsers #29

vegetabill opened this issue Dec 28, 2016 · 1 comment

Comments

@vegetabill
Copy link

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.

@vegetabill
Copy link
Author

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant