-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
[add] support for displaying PDF file #1045
base: develop
Are you sure you want to change the base?
Conversation
Well I guess its the same as https://github.com/wintercms/winter/pull/990/files 😆 |
Kind of worked around it using a partial
|
That looks awesome and will work for 'all' file types. |
Hmm or is that only in the mediafinder and not in form widget? Might need to extend it. Need to test it first. |
@AIC-BV It's only related to the mediamanager! ⚠ Your use case is a little more specific ... I think you are using a If it became possible to carry over dynamic icon support to the |
@damsfx perhaps we should take the logic for generating the SVG and put it in a helper class so that the mediamanager and the fileupload field can use it? |
@LukeTowers Yes, that would be perfect, but I'm not sure how to get started with that change. |
@bennothommo do you have any thoughts on a desired API / direction to go in for the proposal of making it easier to reuse the work that was just added for generating icons based on file extension in the media manager? |
Sure, we could use the PHP SVG library. Would be very simple to have it generate text on the fly from what I can see. |
@LukeTowers @bennothommo Isn't using a library to generate an SVG image (a simple string of characters) a bit over-dimmed? |
@LukeTowers Yes, of course. |
HTML, maybe here: https://github.com/wintercms/storm/blob/develop/src/Filesystem/Filesystem.php as @bennothommo @jaxwilko @mjauvin any thoughts? |
PDFs are not displayed as thumbnail.
This adds support for displaying a PDF 'thumbnail'.
If OK, it should be added to all fileupload widgets.
I guess it is somewhat linked to this PR: #996