Dropping File or Folder from windows without selecting type every time from toolBar

Hello,

I'm currently working with the File Manager component in Angular, and I'm trying to implement a custom drag-and-drop behavior for uploading files and folders from the file system. My goal is to dynamically set the directoryUpload option based on whether the dropped item is a file or a folder. However, I'm encountering a timing issue where the directoryUpload setting only takes effect on the second drop, not the first one.

Here’s a summary of what I'm aiming to achieve:

  1. External File or Folder Drop: When users drag and drop items from outside the application (from their file system) into the File Manager, I need to detect whether each dropped item is a file or a folder.
  2. Dynamic Setting of directoryUpload: I want to set directoryUpload to true if a folder is detected, and false if a file is detected.
  3. Immediate Effect: The directoryUpload setting should apply immediately on the first drop, so the correct upload behavior is triggered right away without requiring a second drop.
Image_2766_1730469715760

Image_1351_1730469730669


Image_2122_1730469754855


Thanks for helping




























1 Reply

SA SureshRajan Alagarsamy Syncfusion Team November 4, 2024 12:01 PM UTC

Hi Mariam,


We have reviewed your query regarding the directoryUpload functionality in the File Manager component. We would like to clarify that our current uploader functionality does not support the simultaneous upload of both folders and individual files when the directory upload is enabled. We have also ensured this behavior in the native input uploader, it only allows the upload of files within the selected folder, and individual files cannot be uploaded at the same time. Our Uploader functionality is also aligns with the same behavior and limitation.

 

For more technical details, you can refer to the following documentation regarding the webkitdirectory property: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#webkitdirectory

 

Regards,
Suresh.


Loader.
Up arrow icon