carrierwaveuploader / carrierwave

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
https://github.com/carrierwaveuploader/carrierwave
8.78k stars 1.66k forks source link

Rails 7 - SanitizedFile.sanitize_regexp setting is not working #2616

Closed bs90 closed 1 year ago

bs90 commented 2 years ago

https://github.com/carrierwaveuploader/carrierwave/blob/master/README.md#filenames-and-unicode-chars I followed this but Japanese filename still became "____.pdf" after uploading. Can anyone help me? Thank you. (It seems that the regex is being default now https://github.com/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/sanitized_file.rb#L23 )

bs90 commented 2 years ago

I monkey patch the sanitize function and solve my problem. But please tell me if there is any another way to do it easier with default setting.

mshibuya commented 2 years ago

Could you provide the example of filenames which gets converted to _ ? What encoding do they have?

I monkey patch the sanitize function

What change you made was effective?

mshibuya commented 1 year ago

Stale.