Skip to content
  • David Mudrák's avatar
    MDL-32471 send_stored_file() now supports the preview option · 82c224ee
    David Mudrák authored
    If for any reason the preview image can't be generated for the given
    file (eg we do not support its mimetype yet), the function will send
    404 Not Found HTTP header. This will be useful for the lazy loading of
    the file thumbnails as the JavaScript will simply ignore such response
    and will not replace the default icon for the file.
    
    In the future, a fallback thumbnail generator can be implemented that
    would generate some sort of default preview for all files (eg using
    the mimetype icon like some desktop OS do).
    82c224ee