Andrew Poulos wrote:
On 1/07/2021 8:55 pm, Thomas 'PointedEars' Lahn wrote:
Andrew Poulos wrote:
How do you allow the user to select a directory (that includes multiple
files and sub-directories) and then upload that to a server while
keeping the existing directory structure?
Accept only (compressed) archive files:
<https://en.wikipedia.org/wiki/List_of_archive_formats>
Every modern file manager includes a way now to create such an archive
file.
So you're saying that I should instruct the user to archive the
directory they want uploaded and then (in the web page) select the
archive?
I suggest to have two “input” elements: One where you use the “webkitdirectory” attribute, another one where you only allow the upload of an archive file. You could make the choice more obvious by using radio
buttons that cause only one of the “input” elements to be shown.
(And, if you wish, an extensible group of input controls with which several files of supported types can be uploaded. But note that you can also have
one “input” element where several files can be selected.)
Be sure to check the MIME media/file type server-side, too.
--
PointedEars
FAQ: <
http://PointedEars.de/faq> | <
http://PointedEars.de/es-matrix> <
https://github.com/PointedEars> | <
http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)