Create tempfile when Active Storage service doesn't implement path_for method#9362
Merged
ahukkanen merged 8 commits intodecidim:developfrom Jun 14, 2022
Merged
Conversation
ahukkanen
reviewed
May 26, 2022
Contributor
|
Could this be merged? |
ahukkanen
approved these changes
Jun 14, 2022
Contributor
ahukkanen
left a comment
There was a problem hiding this comment.
LGTM! Tested this with an actual S3 bucket and it worked fine.
I have merged with develop myself and fixed the merge conflict.
andreslucena
pushed a commit
that referenced
this pull request
Jul 6, 2022
…r method (#9362) * Create tempfile if file isnt available locally * Update test names * Make sure tempfile is deleted after use * Undo importer changes * Update readers and their specs * Update importer test * Process file in importer instead of reader Co-authored-by: Eero Lahdenperä <eero.lahdenpera@mainiotech.fi> Co-authored-by: Antti Hukkanen <antti.hukkanen@mainiotech.fi>
eliegaboriau
pushed a commit
to eliegaboriau/decidim
that referenced
this pull request
Oct 25, 2022
…r method (decidim#9362) * Create tempfile if file isnt available locally * Update test names * Make sure tempfile is deleted after use * Undo importer changes * Update readers and their specs * Update importer test * Process file in importer instead of reader Co-authored-by: Eero Lahdenperä <eero.lahdenpera@mainiotech.fi> Co-authored-by: Antti Hukkanen <antti.hukkanen@mainiotech.fi>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
When Decidim instance was using different active storage service than local it raised error when asked path_for (for a file). Here we download the file as a tempfile (i.e. download file from AWS S3 to server's temp folder) if the service doesn't implement path_for method.
📌 Related Issues