diff options
author | Ryan Davidson <daviryan@aol.com> | 2018-05-06 16:25:05 +0100 |
---|---|---|
committer | Ryan Davidson <daviryan@aol.com> | 2018-05-08 23:01:57 +0100 |
commit | 8e98bb7758f081622ab5c4eebf3730cce22ee627 (patch) | |
tree | 005431e48933ba96e655a56fabd436bcba442c1a /activestorage/CHANGELOG.md | |
parent | 5c7656d9a568fda855e6e558b7e44b1ba51425be (diff) | |
download | rails-8e98bb7758f081622ab5c4eebf3730cce22ee627.tar.gz rails-8e98bb7758f081622ab5c4eebf3730cce22ee627.tar.bz2 rails-8e98bb7758f081622ab5c4eebf3730cce22ee627.zip |
Add option to ActiveStorage::Blob to set extract_content_type_from_io
This adds a boolean argument called identify to ActiveStorage::Blob
methods #create_after_upload, #build_after_upload and #upload. It
allows a user to bypass the automatic content_type inference from
the io.
Diffstat (limited to 'activestorage/CHANGELOG.md')
-rw-r--r-- | activestorage/CHANGELOG.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activestorage/CHANGELOG.md b/activestorage/CHANGELOG.md index 4c12adae56..679ca0df03 100644 --- a/activestorage/CHANGELOG.md +++ b/activestorage/CHANGELOG.md @@ -1,3 +1,18 @@ +* Pass in `identify: false` as an argument when providing a `content_type` for + `ActiveStorage::Attached::{One,Many}#attach` to bypass automatic content + type inference. For example: + + ```ruby + @message.image.attach( + io: File.open('/path/to/file'), + filename: 'file.pdf', + content_type: 'application/pdf', + identify: false + ) + ``` + + *Ryan Davidson* + * The Google Cloud Storage service properly supports streaming downloads. It now requires version 1.11 or newer of the google-cloud-storage gem. |