Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

[S3] Getting original filename in custom objectProperties.key callback #1072

Closed
simshaun opened this issue Dec 13, 2013 · 2 comments
Closed

Comments

@simshaun
Copy link

This is a feature request.

Right now, the only argument passed to a custom objectProperties.key callback is id. (https://github.com/Widen/fine-uploader/blob/4.1.0/client/js/s3/uploader.basic.js#L209)

It would be extremely nice to also have access to the uploaded file's filename in the callback so that it's extension could be used to generate a custom filename.

The API has a getName(id) method that could be used for this, except there is no uploader context in the objectProperties.key callback. You have to rely on a global var to use the API, which doesn't play nicely with multiple uploaders on a page.

So, I think the uploader instance should be provided as an argument to a custom callback on objectProperties.key.

@rnicholus
Copy link
Member

I don't plan on passing a filename or an uploader instance as additional params. The best solution here would be to ensure the context of the call to key function matches the context of the callbacks when they are invoked. We'll consider this for the release after the current one (4.3) most likely.

@lmaurer
Copy link

lmaurer commented Jan 15, 2014

Completed in #1085.

@lmaurer lmaurer closed this as completed Jan 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants