felixrieseberg / React-Dropzone-Component

:camera: ReactJS Dropzone for File Uploads (using Dropzone.js)
MIT License
1k stars 153 forks source link

Allow to upload only pdf files works on desktop but doesn't work on mobile phone's? #200

Open Anup-Borde opened 5 years ago

Anup-Borde commented 5 years ago

Hi,

I have a web app where I am using react drop zone. I want to use the same app on a mobile screen. I want to restrict the user to upload only pdf files I am using the following configuration:- this.djsConfig = { addRemoveLinks: true, acceptedFiles: ".pdf", autoProcessQueue: false, maxFiles: 1, dictDefaultMessage: "Click or Drop files here to upload" };

On the mobile screen, I am able to upload and remove a .pdf file but I am also able to upload other file formats like .png and.jpeg how do I restrict a user from uploading other file formats on mobile screens. Also if a wrong file format is uploaded I am unable to remove the file on mobile screens whereas on a desktop screen it does not allow you to select another file format. So it works fine for desktop but doesn't work the same way on a mobile screen.