如题目,前端用input=file来添加图片
<input type="file" name="file" id="file" value="" accept="image/*" capture="camera" multiple="multiple" enctype="multipart/form-data" onchange="imgChange('z_photo','z_file');" />
如果是一张一张的添加,在后台取文件的时候就只能取到最后一次添加的那张图片
HttpPostedFile uploadFile = request.Files[file] as HttpPostedFile;
虽然解决的不算完美,但也算曲线救国了,我在每次onchange的时候,都会把file里面的图片都保存好,然后把文件名存下来,这样不好的地方就是,后面即便把图片删了,也已经在服务器上存上了,会多了很多无用的图片