safrazik / vue-file-agent

The most beautiful and full featured file upload component for Vue JS
https://safrazik.github.io/vue-file-agent/
MIT License
731 stars 93 forks source link

Uploading a ".tiff" image doesn't work #183

Open lsr57 opened 2 years ago

lsr57 commented 2 years ago

Describe the bug The upload of an image file with the extension ".tiff" doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Go on the demo page here: https://safrazik.github.io/vue-file-agent/
  2. Select a tiff file to upload (you can find one here: https://file-examples.com/index.php/sample-images-download/sample-tiff-download/)
  3. In the browser console, there isn't the log with the file record json that is logged for other files, and there's no preview of the file displayed (like when you upload png ou jpg file).
  4. No error is displayed. The event "select" of the component vue-file-agent is never emitted.

Expected behavior The file is successfully uploaded. We can see on the interface the preview of the file like when we upload a jpg or png image. And the event "select" of the component vue-file-agent is emitted.

Screenshots What you can see when you try to upload a tiff image: there is no preview. image

What you can see when you try to upload a jpg image: image

Desktop (please complete the following information):

Additional context After debugging, I found out that the problem is located in the function utils.resizeImageUrl. The function image.onerror is triggered. It seems that the generation of the preview of the image fails for ".tiff" images.

Thank you for your help.