JeremyFagis / dropify

Override your input files with style — Demo here : http://jeremyfagis.github.io/dropify
MIT License
974 stars 399 forks source link

Default files with fingerprint does not seem to work #91

Open jmadureira opened 6 years ago

jmadureira commented 6 years ago

Hello

If you specify a default image with a fingerprint on the URL no preview will be shown.

<input type="file" class='dropify' data-default-file="../assets/images/auth_bg.jpg?243534523">

The problem seems to be related with the fact it doesn't determine the file extension correctly.

Dropify.prototype.getFileType = function()
{
    return this.file.name.split('.').pop().toLowerCase();
};

This method should probably remove all possible query parameters before determining the file type.

Anduin2017 commented 5 years ago

Same problem here. My image URL doesn't look like https://mywebsite.com/image.png but https://mywebsite.com/image and dropify can not preview it.