How can you upload directory using node.js?

若如初见. 提交于 2020-04-30 07:45:51

问题


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

  1. covert the folder to a zip file (client side), it really depends here on your case.
  2. upload the zip file
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!