2019-07-19 18:32:20 -04:00
|
|
|
* Allow record to be optionally passed to blob finders to make sharding
|
|
|
|
easier.
|
|
|
|
|
|
|
|
*Gannon McGibbon*
|
|
|
|
|
2019-08-06 12:25:39 -04:00
|
|
|
* Switch from `azure-storage` gem to `azure-storage-blob` gem for Azure service.
|
|
|
|
|
|
|
|
*Peter Zhu*
|
|
|
|
|
2019-07-12 15:30:28 -04:00
|
|
|
* Add `config.active_storage.draw_routes` to disable Active Storage routes.
|
|
|
|
|
|
|
|
*Gannon McGibbon*
|
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
* Image analysis is skipped if ImageMagick returns an error.
|
2019-05-30 22:33:29 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
`ActiveStorage::Analyzer::ImageAnalyzer#metadata` would previously raise a
|
|
|
|
`MiniMagick::Error`, which caused persistent `ActiveStorage::AnalyzeJob`
|
|
|
|
failures. It now logs the error and returns `{}`, resulting in no metadata
|
|
|
|
being added to the offending image blob.
|
2019-05-30 22:33:29 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
*George Claghorn*
|
2019-05-30 22:33:29 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
* Method calls on singular attachments return `nil` when no file is attached.
|
2018-07-25 17:04:34 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
Previously, assuming the following User model, `user.avatar.filename` would
|
|
|
|
raise a `Module::DelegationError` if no avatar was attached:
|
2018-07-25 17:04:34 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
```ruby
|
|
|
|
class User < ApplicationRecord
|
|
|
|
has_one_attached :avatar
|
|
|
|
end
|
|
|
|
```
|
2019-05-30 22:33:29 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
They now return `nil`.
|
2018-07-25 17:04:34 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
*Matthew Tanous*
|
2018-07-25 17:04:34 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
* The mirror service supports direct uploads.
|
2019-05-22 15:07:35 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
New files are directly uploaded to the primary service. When a
|
|
|
|
directly-uploaded file is attached to a record, a background job is enqueued
|
|
|
|
to copy it to each secondary service.
|
2019-05-22 15:07:35 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
Configure the queue used to process mirroring jobs by setting
|
|
|
|
`config.active_storage.queues.mirror`. The default is `:active_storage_mirror`.
|
2019-05-22 15:07:35 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
*George Claghorn*
|
2019-05-22 15:07:35 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
* The S3 service now permits uploading files larger than 5 gigabytes.
|
2019-04-24 14:19:15 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
When uploading a file greater than 100 megabytes in size, the service
|
|
|
|
transparently switches to [multipart uploads](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
|
|
|
|
using a part size computed from the file's total size and S3's part count limit.
|
2019-05-16 10:58:33 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
No application changes are necessary to take advantage of this feature. You
|
|
|
|
can customize the default 100 MB multipart upload threshold in your S3
|
|
|
|
service's configuration:
|
2019-05-16 10:58:33 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
```yaml
|
|
|
|
production:
|
|
|
|
service: s3
|
|
|
|
access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
|
|
|
secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
|
|
|
region: us-east-1
|
|
|
|
bucket: my-bucket
|
|
|
|
upload:
|
|
|
|
multipart_threshold: <%= 250.megabytes %>
|
|
|
|
```
|
|
|
|
|
|
|
|
*George Claghorn*
|
2019-05-16 10:58:33 -04:00
|
|
|
|
2019-04-23 16:11:10 -04:00
|
|
|
|
2019-04-24 15:57:14 -04:00
|
|
|
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/activestorage/CHANGELOG.md) for previous changes.
|