I'm using the Jquery File Upload of Blueimp.

When I drag&drop a folder structure like this:

/img/file1.jpg 
/img/img2/file2.jpg

the plugin detects the files included in subfolders, but it keeps a "root" structure in the upload, so my upload it's like:

/img/file1.jpg
/img/file2.jpg

is there any way to mantain the folder structure of the drag&drop folder?

thanks for the help

有帮助吗?

解决方案

Just add the path information into the request sent to the server:

data.formData = {path: data.files[0].relativePath}

And then you'll be able to get it server-side with every other file information, and create the same file structure.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top