Commit Graph

284 Commits

Author SHA1 Message Date
Gannon McGibbon aaa64687e8
Revert #38957 (#44287)
* Revert "Pass service_name param to DirectUploadsController"

This reverts commit 193289dbbe.

* Revert "Multi-service direct uploads in Action Text attachment uploads"

This reverts commit 0b69ad4de6.
2022-01-29 14:27:45 +01:00
Luke Lau 7e61f808c6 Don't stream redirect controller responses
They don't need to be streamed and by including
ActiveStorage::Streaming, they spin up new threads which can cause
problems with connection pools as detailed in #44242
2022-01-26 12:04:40 +00:00
Nando Vieira 865a01d87c
Export assets. 2022-01-06 13:51:46 -08:00
Nando Vieira a75cf1f1f0
Export other ActiveStorage JavaScript modules. 2022-01-06 09:24:36 -08:00
Rafael Mendonça França a17629e393
Fix image_processing link
[ci skip]
2021-12-29 21:36:51 +00:00
Rafael Mendonça França 47fc79ca2b
Merge pull request #43637 from alxjrvs/blob-representation-disposition
Fix Rails 7 Regression - ActiveStorage Content Disposition
2021-12-06 17:39:14 -05:00
Rafael Mendonça França aa55566bcf
Merge pull request #42599 from santib/use-rails-guides-instead-of-edge-guides
Use rails guides instead of edge guides [ci skip]
2021-12-06 17:36:52 -05:00
Kasper Timm Hansen 1df9b01fe6 Pass an array through our stack, don't bother converting back & forth
Users aren't likely to pass non-array values here anyway.
2021-12-04 02:25:42 +01:00
Kasper Timm Hansen 1c309b6bbd compose is primarily meant to take blobs so make them a positional argument 2021-12-04 02:14:48 +01:00
Kasper Timm Hansen 14f190f337 Flip blob question to allow us to exit early 2021-12-04 01:20:05 +01:00
Jean Boussier b30148a2e8 Typo in Active Storage: custom_metadatata -> custom_metadata
Introduced in https://github.com/rails/rails/pull/43294
2021-11-30 11:31:52 +01:00
Gannon McGibbon 79a5e0b759 Add ActiveStorage::Blob.compose 2021-11-25 19:37:57 -05:00
Joshua Sager e106a4a1d2 Introduce custom metadata 2021-11-23 17:35:33 -05:00
DmitryTsepelev 193289dbbe Support direct uploads to multiple services 2021-11-14 11:49:06 +03:00
alxjrvs@gmail.com acda391b3f Update ActiveStorage Blobs Proxycontroller 2021-11-12 13:08:13 -05:00
alxjrvs@gmail.com 8be05519cd Update ActiveStorage Representation Proxycontroller 2021-11-12 13:08:04 -05:00
Alex Ghiculescu 550d728bd1 Active Storage: incorrect defaults
https://github.com/rails/rails/pull/42225 identified that some of the content types used as defaults by Active Storage aren't recognized by `mini_mime`. This means that in practice code like [this](https://github.com/rails/rails/pull/42225/files#diff-7a3ec24c556b138abdbd67066ab5125b73528e45891d83142e417d3944194128R116) will crash or not function correctly. In [this](https://github.com/rails/rails/pull/42225/files#diff-c2010824d2d2e8d841ff4fc058c264c12d870e893025b153e6de571fba6b6c6cR194) example, a file with content_type `image/jpg` is treated as a PNG by the representer, since `image/jpg` isn't a valid content type according to `mini_mime`.

I don't think the default content_types should include formats that have never actually worked, so I'm proposing we remove them from the defaults.
2021-09-22 16:38:52 -05:00
Justin Coyne 31780364b7
Add explicit rendering to DiskController#update
This avoids unhelpful messages in the logs:
```
No template found for ActiveStorage::DiskController#update, rendering head :no_content
```
2021-09-17 13:32:28 -05:00
Kasper Timm Hansen ef65eeef08
Merge pull request #42960 from FestaLab/activestorage/unsafe-redirect
Fix open redirects in active storage
2021-08-16 15:29:52 +02:00
Kasper Timm Hansen 7faf8a0fe3
[ci skip] Undocument send_blob_byte_range_data, don't commit to a public API just yet 2021-08-16 15:16:54 +02:00
Kasper Timm Hansen fe4ec2ac0c
Merge pull request #41437 from tomprats/active-storage-byte-range
Added Active Storage support for byte ranges
2021-08-16 15:13:45 +02:00
Breno Gazzola 77f2af34f9 Fix open redirects in active storage 2021-08-06 19:14:19 -03:00
Ryuta Kamizono b87d8e51d4 Standardize :doc: comments [ci skip] 2021-08-06 17:10:45 +09:00
Tom Prats fcc46228c6 Squashed commit of the following:
commit 1dca99ad4f8082d8daaa17c6600f3036c25f8e50
Author: Tom Prats <tprats108@gmail.com>
Date:   Thu Aug 5 18:07:00 2021 -0400

    Moved header

commit 62201870ff5c4124d90912989745819b05d94516
Merge: 5fa3ecae74 c91a8135c7
Author: Tom Prats <tprats108@gmail.com>
Date:   Thu Aug 5 14:41:22 2021 -0400

    Merge branch 'main' into active-storage-byte-range

commit 5fa3ecae745b4f7c67a6b6b1b7ec420877c96fb8
Author: Tom Prats <tprats108@gmail.com>
Date:   Thu Aug 5 14:39:53 2021 -0400

    Apply suggestions from code review

    Syntax updates

    Co-authored-by: Rafael França <rafael@franca.dev>

commit b9553e3698a7af5105171f9d63bd7b89cbb7e2c3
Author: Tom Prats <tprats108@gmail.com>
Date:   Wed Jun 23 17:36:26 2021 -0400

    Added Active Storage support for byte ranges
2021-08-05 18:12:07 -04:00
Rafael Mendonça França 18707ab17f
Standardize nodoc comments 2021-07-29 21:18:07 +00:00
Rafael Mendonça França 15ed41bf2f
Merge pull request #42515 2021-07-29 01:02:23 +00:00
Rafael França 336af2e185
Merge pull request #42819 from alexcwatt/docs-representable
Representable docs: Refer to the 'variant processor' not ImageMagick
2021-07-28 20:28:55 -04:00
Rafael Mendonça França f24d10c285
Merge branch 'vips-as-default' into main 2021-07-29 00:25:41 +00:00
David Heinemeier Hansson 6c96e1cd7b
Move Active Storage JS to ESM and drop Babel transpiling (#42895)
* Move to ESM and drop Babel transpiling

* Make the activestorage JS directly available through the asset pipeline as a precompiled asset

* Use example with direct attachment

* Explain that direct reference is possible

* Active Storage JS is a module

* Retain umd asset for backwards compatibility, add ESM file in addition

* Explain how to use activestorage.esm with importmap

* Use untranspiled activestorage inclusion

* Don't repeat terser options
2021-07-28 15:17:13 -04:00
Alex Watt ebb9df43e0 Representable docs: Refer to the 'variant processor' not ImageMagick 2021-07-23 17:02:22 -04:00
Ryuta Kamizono 9e9c563a04 ✂️ [ci skip] 2021-07-21 08:54:17 +09:00
Jonathan Hefner acfadacb07 Fix ActiveStorage::Preview#download method doc [ci-skip]
Follow-up to #42742.
2021-07-20 09:32:44 -05:00
Eileen M. Uchitelle 990bcac6f8
Merge pull request #42742 from dmarcoux/document-active_storage-preview-download
Document ActiveStorage::Preview#download [ci-skip]
2021-07-20 08:44:43 -04:00
Dany Marcoux 460a5aeecc
Document ActiveStorage::Preview#download 2021-07-20 10:24:26 +02:00
Zachary Scott c0911e9a36
Merge pull request #42740 from dmarcoux/document-active_storage-attachment-variant
Document ActiveStorage::Attachment#variant
2021-07-20 12:18:06 +09:00
Santiago Bartesaghi e9accafc84 Fix #41388 by preserving protocol and port when generating routes 2021-07-19 09:44:55 -03:00
Breno Gazzola 9bf523559f Make vips the default variant processor for new apps 2021-07-14 14:26:43 -03:00
Dany Marcoux 1cfeca9cf3
Document ActiveStorage::Attachment#variant 2021-07-13 21:57:19 +02:00
Dirkjan Bussink 0523532a3c
Always use OpenSSL constants for Digest operations
As also previously discussed in
https://github.com/rails/rails/pull/40770#issuecomment-748347066, this
moves the usage of Digest constants to always use the OpenSSL version of
those Digest implementations.
2021-06-30 13:57:54 +02:00
Santiago Bartesaghi 65b1e1bb8d Remove already deprecated methods in ActiveStorage 2021-06-27 20:32:05 -03:00
Santiago Bartesaghi 915e32a7a5 Use guides links instead of the edge guides [ci skip] 2021-06-27 20:16:47 -03:00
Anton Topchii 14ea877004 ActiveStorage::Representations controllers:
add support of strict_loading_by_default
2021-06-27 11:06:47 +03:00
Santiago Bartesaghi 63dd10cbb8 Improve ActiveStorage security documentation [ci skip] 2021-06-25 08:06:32 -03:00
Don Sisco f329ae8886 Orphaned attachment relationship safe navigation
closes #42514

- Adds Test for Orphaned Attachment Relationship
- Adds Changelog entry (with issue number)
2021-06-24 09:01:07 -04:00
Anton Topchii 379232ffaf Fix ActiveStorage tests for load_defaults 7.0 2021-06-21 07:44:33 +09:00
Alex Ghiculescu 1c11237538
Update activestorage/app/models/active_storage/variant_with_record.rb
Co-authored-by: Petrik de Heus <petrik@deheus.net>
2021-06-14 12:45:04 -05:00
Alex Ghiculescu 7f348eb9d4 Document Active Storage & Action Text eager loading
Docs for https://github.com/rails/rails/pull/40842 + https://github.com/rails/rails/pull/39397

[ci skip]
2021-06-14 11:03:48 -05:00
Alex Ghiculescu 8e3ad47ef2
Merge branch 'main' into activestorage-variant-nplusone 2021-06-11 12:54:09 -05:00
Jean Boussier 8ae1339ae0 Make `reading_role` and `writing_role` module instance variables
Followup: https://github.com/rails/rails/pull/42442
2021-06-10 18:24:37 +02:00
aki 1dc175338b Allow expires_in for ActiveStorage signed ids 2021-06-05 05:41:11 +09:00