New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveStorage::TransformJob doesn't accept previewable files #50005
Comments
nicowenterodt
added a commit
to nicowenterodt/rails
that referenced
this issue
Nov 10, 2023
The transform_job crahes if you want to preprocess a previewable files. This commit fixes that by checking whether the blob is previewable or not and using the appropriate method.
4 tasks
nicowenterodt
added a commit
to nicowenterodt/rails
that referenced
this issue
Nov 11, 2023
This commit applies the suggestions which occurred during review. - use blobs `representation` method to process variants or previews - more clear changelog entry - harmonize test case with existing one Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
jonathanhefner
added a commit
to nicowenterodt/rails
that referenced
this issue
Nov 11, 2023
The transform_job crahes if you want to preprocess a previewable files. This commit fixes that by using the blob's `representation` method to process variants or previews. Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
jonathanhefner
added a commit
that referenced
this issue
Nov 11, 2023
Fix #50005 transform_job not accepting previewables
catlee
pushed a commit
to Shopify/rails
that referenced
this issue
Dec 4, 2023
The transform_job crahes if you want to preprocess a previewable files. This commit fixes that by using the blob's `representation` method to process variants or previews. Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
When having a predefined variant for an attachment and you're making use of the
preprocessed
option, theActiveStorage::TransformJob
will fail for previewable files like PDFs withActiveStorage::InvariableError
.To reproduce simply define a variant for an attachment like this:
After uploading a PDF the
ActiveStorage::TransformJob
will be enqeued. As soon as the job is being processed it fails withActiveStorage::InvariableError
.Expected behavior
The
ActiveStorage::TransformJob
should accept previewable files as well so preprocessed variants are also possible for PDF documents and other previewable filetypes.Actual behavior
The
ActiveStorage::TransformJob
fails when a previewable blob is being processed withActiveStorage::InvariableError
System configuration
Rails version: 7.1.1
Ruby version: 3.2.2
The text was updated successfully, but these errors were encountered: