Comments (3)
The commit this ticket is pointing to doesn't seem to exist anymore, and as this issue has persisted it doesn't seem like it was ever merged anyhow. I've added some shortcut content_type matchers and changed s3 storage to read content type when it stores, rather than reading the original instance's content type.
This:
:content_type => file.content_type.to_s.strip
Instead of this:
:content_type => instance_read(:content_type)
The patch and tests are in my branch: http://github.com/sorentwo/paperclip
See these commits:
http://github.com/sorentwo/paperclip/commit/a886e76716907bf0b4746efd346a0615f36f97f9
http://github.com/sorentwo/paperclip/commit/3cc0006cfa9a4ea83edbc75a0ca71a6a1073941b
from paperclip.
This really ought to get merged to the trunk soon.
There is no use in having a pluggable processor scheme, if the resulting files are all getting served with the content type of the original file.
from paperclip.
@sorentwo I've merged two of your commits into one single commit, and all the test pass. Thank you for your contribution :)
from paperclip.
Related Issues (20)
- Upload file apk to s3 HOT 1
- AWS::S3::Errors::NoSuchKey No Such Key
- Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: HOT 3
- How to store original in different storage bucket?
- PaperClip 2.8 - Rails 2.3 - Ruby 1.87 - OpenSSL::SSL::SSLError (SSL_read:: shutdown while in init): HOT 2
- With Ruby 3.0 validator produces "ArgumentError: wrong number of arguments (given 3, expected 1..2)" HOT 6
- Paperclip mimemagic dependency licensing implication HOT 11
- Transfer ownership of gem to Kreeti HOT 3
- Generate s3 bucket key from DB records
- Migrate to ActiveStorage without re-uploading files?
- default_url is always hit with a HTTP request
- Paperclip::AdapterRegistry::NoHandlerError:
- "attachment" type migration error in Rails 7 HOT 5
- Uploading same attachment twice.
- Uploading same attachment twice fails until i refresh the ui after first upload.
- *_file_name attribute without extension
- Webp image upload issue HOT 2
- use file -b --mime 'test.json' have problem in AWS linux 2
- ContentTypeDetector false positive from Mime HOT 1
- s3 deprecating TLS 1.1 and moving to default TLS 1.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paperclip.