Closed jkillian closed 12 years ago
Just wanted to let you know that I unintentionally stuck a small change to how the .js file is loaded into this Pull Request without mentioning it in the description. So I'll just mention it here for completeness:
Since in Rails 3.1+, all the JS files in app are compiled to one big JS file, there's no need to include a link to s3_upload.js in the view helper. In fact, this can actually throw an error, such the file won't exist in production mode (using the most common configuration settings). So, this change only includes a link to s3_upload.js if you're using a version or Rails before 3.1 I think this actually makes everything more consistent with the documentation also.
As it was currently, the Content-Disposition header of the s3 upload request was always being set to 'attachment'. This could be bad, as someone might want to upload an image to S3 that users could view inline in the webpage. I made minor updates to the flash side and ruby side to support different values.