因为项目的需要,要实现按目录上传文件,百度了一下首先,文件夹本身是不能上传的,你只能在service端重建文件夹,这很好办。 上传图片你还要遍历文件夹,如下,里面还可以对图片格式进行限制 System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(Request.MapPath("./uploadfile/")); foreach (System.IO.DirectoryInfo di1 in di.GetDirectories()) 相关文章: