Springmvc upload relies on multiparthttpservletrequest to get the request, get the name of the file front end through the request, get Multipartfile,
The code is as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/45/C8/wKiom1PrKq6AYGUEAAel2NfDkl4946.jpg "title=" QQ picture 20140813170542.jpg "alt=" Wkiom1prkq6aygueaael2nfdkl4946.jpg "/>
In fact, it is to get the name of the upload, specify the path of the upload, and then specify to upload to the fixed place, mainly see the For loop inside, other according to their business logic to judge the addition,
Download:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/45/C8/wKiom1PrK1iwd7RTAAU7s3ZZipM876.jpg "title=" QQ picture 20140813170838.jpg "alt=" Wkiom1prk1iwd7rtaau7s3zzipm876.jpg "/>
Download also main catch two points: the first: (1) need to set the type of download, Contentype has different values, such as: text or HTML, you can pass "text/html", if it is Pdf,doc, is another value, need to find their own according to the needs of a bit, (2) need to set the request to cast, that is SetHeader, display the download name and download the length of the content or other,
The second point is to read the file, seize the two points, the download is easy to do