nathancolgate / s3-swf-upload-plugin

A rails 3 gem which allow user upload files to S3 through an embedded flash directly. All UI has been moved out of flex and can be controlled by CSS and JavaScript callbacks.
http://www.nathancolgate.com
MIT License
317 stars 74 forks source link

Change the name of the destination file ? #1

Closed mickey closed 14 years ago

mickey commented 14 years ago

First, KUDOS for this fork, really amazing !

I got a question, is there a way to change the name of the destination file (on s3) ? Thanks,

nathancolgate commented 14 years ago

Thanks, Mickey.

As it stands, you can't SET the name of the destination file before it is uploaded to S3. You can set the prefix, though. Currently all the file name stuff is handled by the original (and awesomely untouched) elctech code. It seems that it has been doing it's job really well for a long time.

You can CHANGE the name via the application using any S3 library after it's been uploaded, though. Use the onUploadComplete callback to make an AJAX call to the app and pass along the file's current key (path and filename).

Good luck!

mickey commented 14 years ago

Thanks Nathan,

I finally made a fork with the ability to change the destination path : http://github.com/mickey/s3-swf-upload-plugin

nathancolgate commented 14 years ago

Mickey, Just a heads up, I had to re-write some stuff to get it to work in 10.1