Closed kungpoo closed 13 years ago
I'm assuming that this has something to do with it?
postVariables["Content-Disposition"] = "attachment";
Which hardcodes 'attachment' on line 173 in the S3UploadRequest.as file
I can confirm that the swf is the problem, I've hacked together a solution but will tidy it up and fork the project soon.
You should change it to
postVariables["Content-Disposition"] = _options.ContentDisposition;
then in S3Signature.as add
upload_options.ContentDisposition = xml.contentdisposition;
then recompile the swf.
Now you can add
content_disposition = "attachment; filename=#{key}"
in s3_uploads_controller.rb, along with
{'Content-Disposition': '#{content_disposition}'},
and
:contentdisposition => content_disposition
}.to_xml
Sorry it's badly formatted and quick I just wanted to put the answer out quickly incase anyone else is stuck as I'm very busy at the moment.
I'm having trouble changing one of the headers set in s3_uploads_controller.rb After making the change the upload no longer works.
Specifically line 30
to
I want to see if it's possible to store the keys by their ID in the database rather than the filename, then when they are requested for download by paperclip use the original filename. The explanation can be found here.