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

${cleaned_filename} is not working #251

Open
kikikiblue opened this issue Jun 28, 2016 · 9 comments
Open

${cleaned_filename} is not working #251

kikikiblue opened this issue Jun 28, 2016 · 9 comments

Comments

@kikikiblue
Copy link

I set the form like below.

<%= s3_uploader_form callback_url: upload_banner_group_url, callback_param: "group[banner_url]", class: "s3-uploader", key: "banners/{timestamp}-{unique_id}-#{SecureRandom.hex}/${cleaned_filename}", key_starts_with: "banners/", max_file_size: 5.megabytes, data: {:id => @group.id} do %>

the uploading result is like this.

2016-06-28 9 48 01

I tried
key: "banners/{timestamp}-{unique_id}-#{SecureRandom.hex}/{cleaned_filename}"

without '$' the result was same.

when I upload without key, like this,
<%= s3_uploader_form callback_url: upload_banner_group_url, callback_param: "group[banner_url]", class: "s3-uploader", key_starts_with: "banners/", max_file_size: 5.megabytes, data: {:id => @group.id} do %>
the upload result is nice. it uploaded with original filename nicely.

I want to remove the special characters from filename. How can I do that?

@mcfiredrill
Copy link
Collaborator

Thanks for reporting this.
Which version of s3_direct_upload are you using?

@kikikiblue
Copy link
Author

Thanks for your quick response.

this is my gemfile
gem 's3_direct_upload', :git => 'git://github.com/waynehoover/s3_direct_upload'

and this is my gemfile.lock

 20   remote: git://github.com/waynehoover/s3_direct_upload
 21   revision: 6972033d6bb086c46461c191c24cefe418e69d68
 22   specs:
 23     s3_direct_upload (0.1.7)
 24       coffee-rails (>= 3.1)
 25       jquery-fileupload-rails (~> 0.4.1)
 26       rails (>= 3.1)
 27       sass-rails (>= 3.1)

@chrisyeung1121
Copy link

Hi I am also having this problem. Any thoughts?

@chrisyeung1121
Copy link

I think it is still not working. for {extension}, {cleaned_filename}. All got uploaded without getting replaced in javascript.

screen shot 2016-11-01 at 4 34 30 pm

@chrisyeung1121
Copy link

Hi Any feedback on this?

@dsounded
Copy link

same here

@gurgelrenan
Copy link

Same problem here, any updates? :/

@Ricardonacif
Copy link

Same here :(

@Ricardonacif
Copy link

Ok, the latest version on Rubygems (1.0.7) doesn't have this feature. I had to use the master version on Gemfile:

gem 's3_direct_upload', github: 'waynehoover/s3_direct_upload'

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

6 participants