Function Description: 1, upload the picture to save to the database
2, will this picture press Scale=125/width > 125/height? The proportion of 125/height:125/width is reduced, save this small graph to the database.
For more information on the error description please visit (http://www.manonghome.com):
IllegalStateException File has been moved-cannot be read again
1, get the picture in request
Multipartfile imgfile= ((defaultmultiparthttpservletrequest) request). GetFile ("Imgfile")
2. Save the big picture
File = new file (firstdir,filename);
Imgfile.transferto (file);
3. Get bufferedimage from imgfile to zoom processing
InputStream is = Imgfile.getinputstream (); This statement throws an exception
BufferedImage Bi=imageio.read (IS);
Save the small diagram by first processing, then save the large image, then no exception thrown. That is, the order is 1,3,2
Bbs.mnpub.net