-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add folder upload #981
Add folder upload #981
Conversation
@ramiresviana thank you for your PR. Could you please fix build errors? |
@o1egl fixed build errors. |
@ramiresviana great job. Can you please add support of upload button too? |
@o1egl is not possible to make an input that accepts both files and folders. What can be made is add another button in the header that only allows selecting folders for upload. |
@ramiresviana do you have an idea how to display it? Maybe we can display a popup with 2 file/filder options if browser supports it. |
@o1egl i can make an prompt that opens when the user clicks on upload button, like this: |
@ramiresviana that would be perfect! But let’s add browser compatibility check and display it only for supported ones. |
@o1egl the buttons in the upload prompt are responsive and can be reused in other components if needed. |
@ramiresviana awesome job! |
* feat: folder upload fix filebrowser#741 * fix: apply gofmt formater * feat: upload button prompt * feat: empty folder upload
Description
Implements ability to upload folders via drag and drop.
Further comments
Uses DataTransferItem.webkitGetAsEntry() to recursively retrieve data from directories, allows multiple selection with files and directories. Works with modern browsers, fallback to old DataTransfer API when not compatible.