-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
InitialPreview icon / File content thumbnail. #809
Comments
I think this is exactly my issue also.... we need help!!! |
@dams0142 thanks for the feedback - the plugin is intended to be configurable and can be styled as per your needs (and maybe render it as a file explorer user interface as well if needed). On your query, currently the markup/content in the initial preview thumbnail is first rendered. The same content is directly used to render the content in the ZOOMED preview as well (with intelligent styling to show a magnified version of it and expand full screen). It would need to be coded entirely differently if you want to show a different content in thumbnail and zoomed preview. Will need to check on this impact and see if there is anything simpler. @emilas44 your issue is different... could you share a JS fiddle to see your configuration and understand the issue? |
@dams0142 I think I can include a configuration to override and display preview icon only in thumbnail but show different content in the zoomed preview. But this may take a bit of time. |
It's simple like in my question on SO http://stackoverflow.com/questions/40998287/krajee-bootstrap-file-upload-plugin-previewfileiconsettings I am using the form upload method - no ajax. And when i choose the files the icons are shown for each file type and for images i get the preview....but when i go to edit view i load those files from my folder and images have preview but all other files are shown like there is no image (see on Stack overflow question) and that is true that there is no image but why it doesn't load the icon for that file type? |
For edit page, you need to configure $('#input-id').fileinput({
initialPreview: [
'<i class="fa fa-file-word-o text-primary"></i>', // icon for file 1
'<i class="fa fa-file-excel-o text-success"></i>', // icon for file 2
],
initialPreviewAsData: false
}); The plugin does not have a method to understand file types on the server to auto display icons based on file type. It could be a potential enhancement to detect this based on file extension. |
OK i see...that was my inquiry to recognize the file type from server and show the file icon accordingly. But i solved it other way around....this was my next question on SO: http://stackoverflow.com/questions/41013883/laravel-blade-show-fa-icon-dependable-on-file-type/41014105#41014105 I don't have an image preview but i have the icon for any file type i have uploaded |
It may include a potential enhancement to detect this based on file extension - for icons... will update. |
That would be cool |
@kartik-v Thank you for your answers. This would be an amazing update if we could have the possibility to override the file content with an icon, in the thumbnail. |
This is resolved via new enhancements. Check the CHANGE LOG. The following demos will help explain this
|
Hey kartik,
First of all, thank you for this awesome tool. I have been playing with it for the last 3 months and it's surprising how you can do almost whatever you want.
It's not an issue as everything works as expected, but i've been struggling to find informations about what i wanna do, hopefully you will help me :)
I'm using initialPreview to populate the plugin with Pdf files, and i allow end users to add more pdf files (or remove some..). The big view when you click the magnifying glass button is really useful and i want this behavior to remain the same, but i would like to know if it's possible to display the Pdf icon instead of the shrinked file content (thumbnail). The user would see the pdf icon in the widget (with caption, size, ...) and he would have to click the mgnifying glass button to actually see the file content.
It's a bit weird for the user to see a Pdf content in the thumbnail and to be unable to read it.
I'm afraid this can't be done because the thumbnail seems to be a shrinked version of the preview, and not another container, but even so, a confirmation would be great.
Thank you :)
Damien.
The text was updated successfully, but these errors were encountered: