s3_direct_upload
s3_direct_upload copied to clipboard
Got working with nested forms
A solution for https://github.com/waynehoover/s3_direct_upload/issues/74
This allows you to use s3 direct upload without requiring a separate form. To use with just an input tag within an existing form you will need to do a couple things.
Set the url for s3 uploader since it can no longer get it from the form
$("#myS3Uploader").S3Uploader(
{
url: '<%=S3DirectUpload.config.url%>'
});
This requires a url to be set in your uploader config
You can then include a file input tag using the following helpers
<%= s3_uploader_hidden_fields%>
<%= s3_uploader_field callback_url: model_url, callback_param: "model[param_name]", id: "myS3Uploader"%>
However this will not work with the IE9 fix and I do not know anything about making it IE9 compatable