Skip to content

Conversation

wvengen
Copy link
Contributor

@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
Contributor 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)

@wvengen wvengen force-pushed the activestorage-representable branch from 7477489 to 1246376 Compare January 16, 2024 15:36
@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.

@mshibuya mshibuya merged commit 4417efc into railsadminteam:master Aug 25, 2024
@mshibuya
Copy link
Member

Tests are required, but I can handle that. Thank you.

mshibuya added a commit that referenced this pull request Aug 25, 2024
- Do not abbreviate 'representation'
- Add specs
@wvengen
Copy link
Contributor Author

wvengen commented Aug 25, 2024

Thank you, also for the last bits!

mshibuya added a commit that referenced this pull request Aug 25, 2024
- Do not abbreviate 'representation'
- Add specs
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.

3 participants