@rails/activestorage 6.1.4 → 6.1.5

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