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

Allow setting of fileupload options through s3uploader #126

Closed
wants to merge 1 commit into from

Conversation

ryanwood
Copy link

@ryanwood ryanwood commented Sep 2, 2013

This is a fairly simple change to address #125. I created a new settings option called fileupload_options which defaults to null. By passing any valid option from https://github.com/blueimp/jQuery-File-Upload/wiki/Options you can set the option directly in the fileupload plugin.

I simply moved all of the fileupload function overrides to an api object and them extended them with the new settings option. I intentionally made it so that someone could override even the s3uploader default API in case they wanted to extend it.

Let me know if you have any questions.

@sheerun
Copy link

sheerun commented Sep 19, 2013

It is possible in my spin-off gem: https://github.com/sheerun/s3_file_field

@dsounded dsounded mentioned this pull request Dec 17, 2016
@andrewjdmccann
Copy link

andrewjdmccann commented Jan 30, 2018

If anyone runs into this issue and comes across this pull request there's a (somewhat fragile) work around until this PR or similar gets merged. It relies on the fact that s3_direct_upload leverages jQuery-File-Upload but that's unlikely to change, so this should be pretty safe.

jQuery-File-Upload allows you to set some of it's options via data attributes.
https://github.com/blueimp/jQuery-File-Upload/wiki/API#data-attributes

s3_uploader_form(
  # ...
  :data => {
    # ...
    :drop_zone => ".my-dropZone-selector"
  }
)

@ryanwood ryanwood closed this Mar 1, 2023
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

Successfully merging this pull request may close these issues.

3 participants