Closed desheikh closed 9 years ago
I have exactly the same problem with the included backtrace: https://gist.github.com/arjan0307/ed4d4521b8696f8f4605
It happens when an upload is attempted with the following parameters:
"document_attributes": {
"key": "uploads/documents/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/Overzicht zakelijke en privé kilometers.msg"
Mind the é
in privé
This seems to be one of the problems that https://github.com/dwilkie/carrierwave_direct/pull/120 fixes.
This should be fixed on master.
Closed because of inactivity.
When uploading filenames with accented characters (é), attempting to modify the object with the attachment causes the following exception.
URI::InvalidURIError: URI must be ascii only
Heres part of the stack_trace 2.2.0/gems/carrierwave_direct-0.0.14/lib/carrierwave_direct/uploader.rb:64:in
key' 2.2.0/gems/carrierwave_direct-0.0.14/lib/carrierwave_direct/uploader.rb:81:in
has_key?' 2.2.0/gems/carrierwave_direct-0.0.14/lib/carrierwave_direct/uploader.rb:94:in `filename'This seems to be a problem with encoded_url only escaping certain characters. I'm not sure why we need to decode/encode the url again at all, since the url is already stored in encoded format and simply calling URI.parse url should just work.