Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Non-english characters in file names are stripped #35

Open
alperakgun opened this issue Nov 6, 2015 · 0 comments
Open

Non-english characters in file names are stripped #35

alperakgun opened this issue Nov 6, 2015 · 0 comments

Comments

@alperakgun
Copy link

Non english or accented characters in file names are replaced with underscore; for example; ça-über.xls is not allowed. This maybe a feature but maybe an option can be useful to switch to allowing international letter.. Kind regards

https://github.com/krobertson/dm-paperclip/blob/master/lib/dm-paperclip/attachment.rb
LINE 108:
instance_write(:file_name, uploaded_file['filename'].strip.gsub(/[^\w\d.-]+/, '_'))

This one works fine LINE 108
instance_write(:file_name, uploaded_file['filename'].strip.gsub(/[^\p{Word}\d.-]+/, '_'))

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

No branches or pull requests

1 participant