nathancolgate/s3-swf-upload-plugin — Issue #51: Feature Request: Final File Name Configuration & keyPrefix
Author: JohnPostlethwait
Created: 2011-12-19 21:13:56+00:00
State: open

I have a case where I HAVE to have the final file name on S3 be a very specific name/format. We are using a version of this code from well over a year ago and the file name on S3 ends up just being the keyPrefix we set during initialization, however; after updating this code couple of days ago we noticed that the file name is now our keyPrefix PLUS the original file name appended to the end. For us this is not something that can be as we have a service that looks for a very specific file name format for our uploads.

I see in S3Signature.as, over a year ago, this snippet of code was touched:

```actionscript
upload_options.key = prefixPath + upload_options.FileName;
```

I am not positive this causes this issue, as I am not too familiar with this code, but it was my best find... Would it be possible to add an initialization option to NOT append the original file name to the end of the final file name (the default being as it is now, where it does...)?

I assume the version we were previously using, which made the keyPrefix the ENTIRE filename, was deemed to be a bug and changed to this, but we rely on it.

I also see that there is a part of the README now that tells people to do this with the back-end after the upload is complete, but that is super asynchronous, and somewhat kludgy as it can seemingly be done right from this bundle of code... (And, is being done already when the file is created on S3.)

Thanks!

-John