Duplicated
Last Updated: 02 Jun 2023 09:18 by ADMIN
Created by: Emil
Comments: 3
Category: Upload
Type: Feature Request
0

Hello, 

We have migrated to Kendo React (from jQuery) and are unable to use Directory upload functionality which existed in jQuery version:

https://demos.telerik.com/kendo-ui/upload/directoryupload

Currently in order to achieve such functionality, the only way is to inject required file input attributes manually as shown below:

    useEffect(() => {
        if (uploadWrapperRef.current) {
            const targetInput = uploadWrapperRef.current.querySelector('input');

            isFolder
                ? targetInput.setAttribute('webkitdirectory', '')
                : targetInput.removeAttribute('webkitdirectory');
        }
    }, [uploadWrapperRef, isFolder]);

This partially solves the issue, however because the directory upload functionality is not provided natively, we are unable to use drag-and-drop functionality for folders. There is no way to overwrite 'onDrop' functionality, which currently accepts only files but not folders.

Would it be possible to add Directory upload to KendoReact as well?

Kind regards,

Emil