Forum Discussion
pragadees
Apr 15, 2020Copper Contributor
React webpart Drag and Drop files issue
Hi,
I'm creating drag and drop files web part using React SPFX, but I'm confronting a issues where I'm not able to trigger the onDrop file event. I have tried different component and tutorial. It works fine in tutorial and videos. However, in SharePoint web part I can't able to drop my file. Guys please someone shed a light in this problem and it will be really beneficial. Thanks in advance.
- Sudharsan KSteel ContributorHi,
You can you use the filepicker control from the React Reusable controls for the file upload, if you really need the drag and drop, please follow the below link
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-file-upload
Detailed post on using React Reusable controls for filepicker
https://windowssharepointserver.blogspot.com/2020/02/spfx-using-filepicker-and-filetypeicon.html
Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...