You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
I have recently moved my project from MRI ruby to JRuby. At that time I needed to change my backticks calls to encode the ruby strings into ascii-8bit when passing it into the call to ensure that the correct file is found for example.
Now I noticed that when Paperclip 4.2.0 (and earlier versions) tries to validate the content type of an attachment whose file name contains utf-8 characters like Öäå the file name goes in with a wrong encoding. The error message is
Command :: file -b --mime '/tmp/ea_Neliö20141119-12290-a5imen'
[paperclip] Error while determining content type: Command 'file -b --mime '/tmp/ea_Neliö20141119-12290-a5imen'' returned 1. Expected 0
Here is the command output:
ERROR: cannot open `/tmp/ea_Neliö20141119-12290-a5imen' (No such file or directory)
I'm running the application on Ubuntu in development and Debian in production.
I would love to offer a patch for this but finding the correct line to fix is not so easy. The way validations are working in Rails seems to be magic.
The text was updated successfully, but these errors were encountered:
I have recently moved my project from MRI ruby to JRuby. At that time I needed to change my backticks calls to encode the ruby strings into ascii-8bit when passing it into the call to ensure that the correct file is found for example.
Now I noticed that when Paperclip 4.2.0 (and earlier versions) tries to validate the content type of an attachment whose file name contains utf-8 characters like Öäå the file name goes in with a wrong encoding. The error message is
I'm running the application on Ubuntu in development and Debian in production.
I would love to offer a patch for this but finding the correct line to fix is not so easy. The way validations are working in Rails seems to be magic.
The text was updated successfully, but these errors were encountered: