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
I have been investigating an issue with corrupted png:s, and have been able to track down at least one place where it does not work as expected.
I had a non-corrupted png-file in the assets folder, but when served through the rakep server the browser was receiving it corrupted.
I was able to fix that by changing to a binary file.open in Middleware.rb:
def response_for(file)
[ 200, headers_for(file), File.open(file, "rb") ]
end
I am also seeing that the same non-corrupted png-file in the tmp-directory will be corrupted once it is copied in to the assets folder. I assume that the fix for it would be similar, but I was unable to track down exactly what part of the code base is responsible for copying the files from the tmp-folders to the assets folder.
The text was updated successfully, but these errors were encountered:
Hi!
I have been investigating an issue with corrupted png:s, and have been able to track down at least one place where it does not work as expected.
I had a non-corrupted png-file in the assets folder, but when served through the rakep server the browser was receiving it corrupted.
I was able to fix that by changing to a binary file.open in Middleware.rb:
I am also seeing that the same non-corrupted png-file in the tmp-directory will be corrupted once it is copied in to the assets folder. I assume that the fix for it would be similar, but I was unable to track down exactly what part of the code base is responsible for copying the files from the tmp-folders to the assets folder.
The text was updated successfully, but these errors were encountered: