问题
I'm new to node and want to upload directory using node.js. Can anybody please help? Thank You If it's possible how? and if not then why?
回答1:
you can upload only files.
however there are workarounds,you can
- covert the folder to a zip file (client side), it really depends here on your case.
- upload the zip file
- then unzip it in the server
you can use google to find out how to do every step of those.
回答2:
You can use use any Folder uploading library like https://github.com/blueimp/jQuery-File-Upload or https://dropzonejs.com which allows you to Drag and Drop whole directory using HTML5 features.
来源:https://stackoverflow.com/questions/15342383/how-can-you-upload-directory-using-node-js