Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: be able to specify a filename to the files #7

Open
ghost opened this issue Oct 4, 2014 · 1 comment
Open

feature request: be able to specify a filename to the files #7

ghost opened this issue Oct 4, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 4, 2014

Hi,

I'm looking for a way to specify a filename to the files I'm uploading to S3.

I noticed that here you are passing an empty doc to the constructor, are you planning to open it up to the callbacks (possibly manipulateImage), so that we can specify the filename? Or you passed an empty doc deliberately due to some reason I completely missed?

I'd like to know your opinion on this.

Thank you very much.

Great updates btw.

@jamgold
Copy link

jamgold commented Apr 21, 2015

I figured out a quick way to do this, but it requires to clone the project and modify lib/UploaderFile.coffe. In the upload method I simply check if the settings contain an id and use that to construct the filename on S3 side

  UploaderFile::upload = (filePath) ->
    config = Uploader.getConfig()
    knox = Knox.createClient config

    if @settings.id?
      cloudPath = "#{@settings.id}#{@ext}"
    else
      cloudPath = "#{@id}#{@ext}"

....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant