s3_direct_upload icon indicating copy to clipboard operation
s3_direct_upload copied to clipboard

${cleaned_filename} is not working

Open kikikiblue opened this issue 8 years ago • 9 comments

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?

kikikiblue avatar Jun 28 '16 12:06 kikikiblue

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

mcfiredrill avatar Jun 28 '16 15:06 mcfiredrill

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)

kikikiblue avatar Jun 28 '16 15:06 kikikiblue

Hi I am also having this problem. Any thoughts?

chrisyeung1121 avatar Sep 21 '16 12:09 chrisyeung1121

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 avatar Nov 01 '16 08:11 chrisyeung1121

Hi Any feedback on this?

chrisyeung1121 avatar Jan 17 '17 06:01 chrisyeung1121

same here

dsounded avatar Feb 14 '17 12:02 dsounded

Same problem here, any updates? :/

gurgelrenan avatar May 22 '17 19:05 gurgelrenan

Same here :(

Ricardonacif avatar Nov 18 '17 20:11 Ricardonacif

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'

Ricardonacif avatar Nov 18 '17 20:11 Ricardonacif