0
0
Fork 0

Fix invalid Content-Type header for WebP images (#26773)

This commit is contained in:
Christian Schmidt 2023-09-04 09:46:33 +02:00 committed by GitHub
parent 1f92436745
commit ea31929776
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -105,6 +105,9 @@ RSpec.describe MediaAttachment, paperclip_processing: true do
# sets file extension
expect(media.file_file_name).to end_with extension
# Rack::Mime (used by PublicFileServerMiddleware) recognizes file extension
expect(Rack::Mime.mime_type(extension, nil)).to eq content_type
end
it 'saves media attachment with correct size metadata' do