FineUploader / fine-uploader

Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.
https://fineuploader.com
MIT License
8.19k stars 1.87k forks source link

Support arbitrary HTML dom elements as thumbnail placeholders #1493

Open barchard opened 8 years ago

barchard commented 8 years ago

Please add support for specifying a HTML or dom element for thumbnails.placeholders.notAvailablePath and thumbnails.placeholders.waitingPath. This would allow users to specify, for example, Font Awesome icons in place of actual images. E.g.,

{
  thumbnails: {
    placeholders: {
      notAvailablePath: "<i class='fa fa-file-o'></i>",
      waitingPath: "<i class='fa fa-refresh fa-spin'></i>"
  }
rnicholus commented 8 years ago

I'm not sure the path options above are appropriate for this type of value. But I certainly can see the need to use HTML (especially <svg>) elements in place of images. Instead of including options with an HTML string, I would expect these to be defined in the Fine Uploader template, and tagged with a -selector class such as qq-img-not-available-selector. The templating module would be used along with the image generation module to show/hide these elements at the proper time (if they exist in the template) This approach is more consistent with post-3.x Fine Uploader.

barchard commented 8 years ago

Sounds like a good approach. Thanks.

aknosis commented 8 years ago

:+1:

Need this same functionality to prevent polluting source with more images and allowing to share elements with the parent site.