Forum Discussion
SR2612
Jul 20, 2023Copper Contributor
How to disable Drag and Drop feature in sharepoint online document library
Hi All, Based on project requirement, we are using custom forms while uploading documents in SharePoint Online site using SPFx. However the drag and drop feature directly uploads the document, w...
SvenSieverding
Jul 20, 2023Bronze Contributor
You could create an app page running an spfx webpart as a single page application.
In that webpart create the file view yourself using i.e. a "Fluent UI DetailsList". If the user selects an item, display your edit form. Now create your own file upload dialog using a FilePicker Control (https://pnp.github.io/sp-dev-fx-controls-react/controls/FilePicker/)
Then redirect your users to use that app page instead to the list.
If you don't want to use much functionality from the default list view control (like Sharing, Copy&Past etc) and if you already have a custom SPFX form then this might not be that much additional work.
Best Regards,
Sven
In that webpart create the file view yourself using i.e. a "Fluent UI DetailsList". If the user selects an item, display your edit form. Now create your own file upload dialog using a FilePicker Control (https://pnp.github.io/sp-dev-fx-controls-react/controls/FilePicker/)
Then redirect your users to use that app page instead to the list.
If you don't want to use much functionality from the default list view control (like Sharing, Copy&Past etc) and if you already have a custom SPFX form then this might not be that much additional work.
Best Regards,
Sven