Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for active storage preview #6

Closed
wants to merge 1 commit into from

Conversation

tachyons
Copy link

@tachyons tachyons commented Oct 4, 2018

Fixes #1

@richardvenneman
Copy link
Owner

richardvenneman commented Oct 4, 2018

@tachyons thanks for the PR, it is nice that the previewer can resize the image. Let me test this.

But please note this doesn't fix #1 (show image preview right after image is selected from local.)

@tachyons
Copy link
Author

tachyons commented Oct 4, 2018

Okay, I missed that. But since preview is to be generated using backend tool, previewing right after uploading won't be easy

@richardvenneman
Copy link
Owner

Also, in the case of an image this code is not reached. I am wondering if this code can just replace the conditional?

@tachyons
Copy link
Author

tachyons commented Oct 4, 2018

I tried it, But got following error
ActiveStorage::UnpreviewableError: ActiveStorage::UnpreviewableError

@richardvenneman
Copy link
Owner

I see. It appears that previewable? only works with PDF and video files. For images we need #variable?. Let me do some more testing tonight before I merge your PR.

@richardvenneman
Copy link
Owner

richardvenneman commented Oct 4, 2018

@tachyons I rewrote the attachment previewing in bbbd3e9 and incorporated your input, thanks!

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

Successfully merging this pull request may close these issues.

2 participants