@rails/activestorage 6.1.3 → 6.1.4-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/CHANGELOG.md +0 -263
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/activestorage",
3
- "version": "6.1.3",
3
+ "version": "6.1.4-4",
4
4
  "description": "Attach cloud and local files in Rails applications",
5
5
  "main": "app/assets/javascripts/activestorage.js",
6
6
  "files": [
package/CHANGELOG.md DELETED
@@ -1,263 +0,0 @@
1
- ## Rails 6.1.3 (February 17, 2021) ##
2
-
3
- * No changes.
4
-
5
-
6
- ## Rails 6.1.2.1 (February 10, 2021) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 6.1.2 (February 09, 2021) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 6.1.1 (January 07, 2021) ##
17
-
18
- * Fix S3 multipart uploads when threshold is larger than file.
19
-
20
- *Matt Muller*
21
-
22
-
23
- ## Rails 6.1.0 (December 09, 2020) ##
24
-
25
- * Change default queue name of the analysis (`:active_storage_analysis`) and
26
- purge (`:active_storage_purge`) jobs to be the job adapter's default (`:default`).
27
-
28
- *Rafael Mendonça França*
29
-
30
- * Implement `strict_loading` on ActiveStorage associations.
31
-
32
- *David Angulo*
33
-
34
- * Remove deprecated support to pass `:combine_options` operations to `ActiveStorage::Transformers::ImageProcessing`.
35
-
36
- *Rafael Mendonça França*
37
-
38
- * Remove deprecated `ActiveStorage::Transformers::MiniMagickTransformer`.
39
-
40
- *Rafael Mendonça França*
41
-
42
- * Remove deprecated `config.active_storage.queue`.
43
-
44
- *Rafael Mendonça França*
45
-
46
- * Remove deprecated `ActiveStorage::Downloading`.
47
-
48
- *Rafael Mendonça França*
49
-
50
- * Add per-environment configuration support
51
-
52
- *Pietro Moro*
53
-
54
- * The Poppler PDF previewer renders a preview image using the original
55
- document's crop box rather than its media box, hiding print margins. This
56
- matches the behavior of the MuPDF previewer.
57
-
58
- *Vincent Robert*
59
-
60
- * Touch parent model when an attachment is purged.
61
-
62
- *Víctor Pérez Rodríguez*
63
-
64
- * Files can now be served by proxying them from the underlying storage service
65
- instead of redirecting to a signed service URL. Use the
66
- `rails_storage_proxy_path` and `_url` helpers to proxy an attached file:
67
-
68
- ```erb
69
- <%= image_tag rails_storage_proxy_path(@user.avatar) %>
70
- ```
71
-
72
- To proxy by default, set `config.active_storage.resolve_model_to_route`:
73
-
74
- ```ruby
75
- # Proxy attached files instead.
76
- config.active_storage.resolve_model_to_route = :rails_storage_proxy
77
- ```
78
-
79
- ```erb
80
- <%= image_tag @user.avatar %>
81
- ```
82
-
83
- To redirect to a signed service URL when the default file serving strategy
84
- is set to proxying, use the `rails_storage_redirect_path` and `_url` helpers:
85
-
86
- ```erb
87
- <%= image_tag rails_storage_redirect_path(@user.avatar) %>
88
- ```
89
-
90
- *Jonathan Fleckenstein*
91
-
92
- * Add `config.active_storage.web_image_content_types` to allow applications
93
- to add content types (like `image/webp`) in which variants can be processed,
94
- instead of letting those images be converted to the fallback PNG format.
95
-
96
- *Jeroen van Haperen*
97
-
98
- * Add support for creating variants of `WebP` images out of the box.
99
-
100
- *Dino Maric*
101
-
102
- * Only enqueue analysis jobs for blobs with non-null analyzer classes.
103
-
104
- *Gannon McGibbon*
105
-
106
- * Previews are created on the same service as the original blob.
107
-
108
- *Peter Zhu*
109
-
110
- * Remove unused `disposition` and `content_type` query parameters for `DiskService`.
111
-
112
- *Peter Zhu*
113
-
114
- * Use `DiskController` for both public and private files.
115
-
116
- `DiskController` is able to handle multiple services by adding a
117
- `service_name` field in the generated URL in `DiskService`.
118
-
119
- *Peter Zhu*
120
-
121
- * Variants are tracked in the database to avoid existence checks in the storage service.
122
-
123
- *George Claghorn*
124
-
125
- * Deprecate `service_url` methods in favour of `url`.
126
-
127
- Deprecate `Variant#service_url` and `Preview#service_url` to instead use
128
- `#url` method to be consistent with `Blob`.
129
-
130
- *Peter Zhu*
131
-
132
- * Permanent URLs for public storage blobs.
133
-
134
- Services can be configured in `config/storage.yml` with a new key
135
- `public: true | false` to indicate whether a service holds public
136
- blobs or private blobs. Public services will always return a permanent URL.
137
-
138
- Deprecates `Blob#service_url` in favor of `Blob#url`.
139
-
140
- *Peter Zhu*
141
-
142
- * Make services aware of configuration names.
143
-
144
- *Gannon McGibbon*
145
-
146
- * The `Content-Type` header is set on image variants when they're uploaded to third-party storage services.
147
-
148
- *Kyle Ribordy*
149
-
150
- * Allow storage services to be configured per attachment.
151
-
152
- ```ruby
153
- class User < ActiveRecord::Base
154
- has_one_attached :avatar, service: :s3
155
- end
156
-
157
- class Gallery < ActiveRecord::Base
158
- has_many_attached :photos, service: :s3
159
- end
160
- ```
161
-
162
- *Dmitry Tsepelev*
163
-
164
- * You can optionally provide a custom blob key when attaching a new file:
165
-
166
- ```ruby
167
- user.avatar.attach key: "avatars/#{user.id}.jpg",
168
- io: io, content_type: "image/jpeg", filename: "avatar.jpg"
169
- ```
170
-
171
- Active Storage will store the blob's data on the configured service at the provided key.
172
-
173
- *George Claghorn*
174
-
175
- * Replace `Blob.create_after_upload!` with `Blob.create_and_upload!` and deprecate the former.
176
-
177
- `create_after_upload!` has been removed since it could lead to data
178
- corruption by uploading to a key on the storage service which happened to
179
- be already taken. Creating the record would then correctly raise a
180
- database uniqueness exception but the stored object would already have
181
- overwritten another. `create_and_upload!` swaps the order of operations
182
- so that the key gets reserved up-front or the uniqueness error gets raised,
183
- before the upload to a key takes place.
184
-
185
- *Julik Tarkhanov*
186
-
187
- * Set content disposition in direct upload using `filename` and `disposition` parameters to `ActiveStorage::Service#headers_for_direct_upload`.
188
-
189
- *Peter Zhu*
190
-
191
- * Allow record to be optionally passed to blob finders to make sharding
192
- easier.
193
-
194
- *Gannon McGibbon*
195
-
196
- * Switch from `azure-storage` gem to `azure-storage-blob` gem for Azure service.
197
-
198
- *Peter Zhu*
199
-
200
- * Add `config.active_storage.draw_routes` to disable Active Storage routes.
201
-
202
- *Gannon McGibbon*
203
-
204
- * Image analysis is skipped if ImageMagick returns an error.
205
-
206
- `ActiveStorage::Analyzer::ImageAnalyzer#metadata` would previously raise a
207
- `MiniMagick::Error`, which caused persistent `ActiveStorage::AnalyzeJob`
208
- failures. It now logs the error and returns `{}`, resulting in no metadata
209
- being added to the offending image blob.
210
-
211
- *George Claghorn*
212
-
213
- * Method calls on singular attachments return `nil` when no file is attached.
214
-
215
- Previously, assuming the following User model, `user.avatar.filename` would
216
- raise a `Module::DelegationError` if no avatar was attached:
217
-
218
- ```ruby
219
- class User < ApplicationRecord
220
- has_one_attached :avatar
221
- end
222
- ```
223
-
224
- They now return `nil`.
225
-
226
- *Matthew Tanous*
227
-
228
- * The mirror service supports direct uploads.
229
-
230
- New files are directly uploaded to the primary service. When a
231
- directly-uploaded file is attached to a record, a background job is enqueued
232
- to copy it to each secondary service.
233
-
234
- Configure the queue used to process mirroring jobs by setting
235
- `config.active_storage.queues.mirror`. The default is `:active_storage_mirror`.
236
-
237
- *George Claghorn*
238
-
239
- * The S3 service now permits uploading files larger than 5 gigabytes.
240
-
241
- When uploading a file greater than 100 megabytes in size, the service
242
- transparently switches to [multipart uploads](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
243
- using a part size computed from the file's total size and S3's part count limit.
244
-
245
- No application changes are necessary to take advantage of this feature. You
246
- can customize the default 100 MB multipart upload threshold in your S3
247
- service's configuration:
248
-
249
- ```yaml
250
- production:
251
- service: s3
252
- access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
253
- secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
254
- region: us-east-1
255
- bucket: my-bucket
256
- upload:
257
- multipart_threshold: <%= 250.megabytes %>
258
- ```
259
-
260
- *George Claghorn*
261
-
262
-
263
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/activestorage/CHANGELOG.md) for previous changes.