vue-upload-drop-images icon indicating copy to clipboard operation
vue-upload-drop-images copied to clipboard

How to prevent other type of file upload

Open iftekharul-dev opened this issue 3 years ago • 6 comments

I want to prevent to upload other types of file. but its uploading all types of file .

iftekharul-dev avatar Sep 03 '21 11:09 iftekharul-dev

hello @iftekharul-dev,

It's already accepting just the files of type image as you see here: https://github.com/yudax42/vue-upload-drop-images/blob/c1e6837560b7075cc99a55cadc460769cc687f74/dist/vue-upload-drop-images.vue#L123

Please explain more your issue so I can help you.

Thank you!

yudax42 avatar Sep 03 '21 19:09 yudax42

Yes, i saw that, but its accept all files.Also not working on your demo https://vueupload.yudax.dev/ :( ..

iftekharul-dev avatar Sep 04 '21 04:09 iftekharul-dev

Can you please tell me which browser are you using? Currently, it's using just accept input which works only on this list of browsers:

  • Chrome 16 +
  • Safari 6 +
  • Firefox 9 +
  • IE 10 +
  • Opera 11 +

I will try to validate the input files using javascript in the future.

yudax42 avatar Sep 04 '21 17:09 yudax42

Its Chrome 16 +

iftekharul-dev avatar Sep 04 '21 17:09 iftekharul-dev

Interesting, on Firefox 9+ it does the same. @iftekharul-dev I suggest just adding validation to handle this until @yudax42 finds something.

CyferZ avatar Oct 12 '21 19:10 CyferZ

Can this be open for one to set what images they accept other than accepting all image types.

isaacssemugenyi avatar Feb 09 '24 12:02 isaacssemugenyi