Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to upload a folder to a website?

I need an easy way to allow users to upload multiple files at once (ie I need to allow a user to upload a folder). I do not wish to put the burden of zipping on the user.

I would prefer to avoid Flash or variants if possible. I'm looking for a straight javascript / HTML solution if it is possible. Please note, this rules out the answers at: What is the best client side browser library to upload multiple files over http?.

like image 999
torial Avatar asked Oct 31 '08 17:10

torial


People also ask

How do I upload a folder to my website?

How to upload files/folders to my website? Navigate to the folder in which you want to upload from the folder/file tree on the left. Click the File Upload or the Folder Upload icon in the upper toolbar and choose the upload item from your computer. There is no file size limit for uploads in the File Manager.

How can I upload an entire folder?

You can upload files into private or shared folders. On your computer, go to drive.google.com. File Upload or Folder Upload. Choose the file or folder you want to upload.

How do I upload a folder to a server?

Uploading filesIn the left window (your computer) locate the file or folder you'd like to upload. Right click it. From the pop-up, choose 'Upload'. This uploads the file to the server.


2 Answers

You won't be able to do it with just HTML and Javascript. I'd recommend trying Fancy Upload, a MooTools plugin for multiple file uploads. It uses a mixture of JavaScript and Flash, but degrades gracefully. It works with all major browsers including IE6 and there is also a Flash 10 compatible release available for download (though the demo hasn't been updated yet).


Update (2012-11-26):

Multiple file uploads are possible with valums or blueimp file uploaders.

For recursive directory uploads, your best solution is using Chrome 11's new folder upload API. It also seems to work on Firefox if you use a vendor prefix.

like image 113
VirtuosiMedia Avatar answered Sep 30 '22 05:09

VirtuosiMedia


With Firefox 42 and Edge having implemented the new directory upload proposal we'll finally able to do cross-browser directory uploads. The APIs are nasty enough that you may want to check out my wrapper, uppie.

like image 32
silverwind Avatar answered Sep 30 '22 04:09

silverwind