reflex icon indicating copy to clipboard operation
reflex copied to clipboard

[REF-1066] How can I upload an entire directory?

Open 1qh opened this issue 3 years ago β€’ 3 comments

I really want to be able to upload a folder that contains multiple files and subfolders. How can I achieve that?

Thanks a lot!

REF-1066

1qh avatar Oct 30 '23 03:10 1qh

This actually is possible today, if you drop a directory onto the upload dropzone, then it will add all the files... however Reflex currently does not save the files paths, only the name, so the hierarchy information is lost.

I'm currently working on the upload code, and have changed all of the f.name references to f.path || f.name, so hopefully this should "just work" in the next release.

That said, I couldn't find out a way to support selecting a directory in the OS-specific select a file dialog. It seems to only work with drag/drop.

masenf avatar Oct 30 '23 21:10 masenf

Yes, I really want to implement a simple logic: select a folder, then save it to server's hard disk (like upload a folder to google drive). I really hope it would be possible in the next release.

Thank you for your response!

1qh avatar Oct 31 '23 04:10 1qh

Should be fixed in reflex 0.3.3

masenf avatar Nov 27 '23 23:11 masenf