Skip to content
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

Show a thumbnail of all representable Active Storage files + images #3656

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wvengen
Copy link

@wvengen wvengen commented Nov 15, 2023

Currently, only images have a preview when using Active Storage attachments. Preview of videos (and potentially other file formats) are supported, however, but one needs to use representable instead of only previewable. This PR switches to using representable.

Tested with movie previews and images on multiple upload.

Note that we still need to look at the image mime-type, to show e.g. SVG images (which are not representable, but can still be shown directly - great that there is an automated test for this).

See also:

@wvengen wvengen force-pushed the activestorage-representable branch 2 times, most recently from 42b2c0c to 5096a4e Compare November 15, 2023 11:18
@wvengen wvengen marked this pull request as draft November 15, 2023 11:34
@wvengen wvengen changed the title Show a thumbnail of all representable Active Storage files Show a thumbnail of all representable Active Storage files + images Nov 15, 2023
@wvengen wvengen marked this pull request as ready for review November 15, 2023 11:52
@wvengen
Copy link
Author

wvengen commented Nov 15, 2023

It's not clear to me why one test fails (jruby-9.3, rails_6.1, active_record, mysql2, sprockets) and all the others succeed. It doesn't look like it would be related to the changes in this PR (timeout errors). (after a rebase all tests succeeded)

@coveralls
Copy link

Coverage Status

coverage: 95.996% (+0.1%) from 95.9%
when pulling 1246376 on wvengen:activestorage-representable
into af7414a on railsadminteam:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants