I created an applet that upload's images using commons.fileUpload. That worked perfectly but now I wanted to upload a thumbnail of that picture at the sametime, that would be called thumb_picturename.jpg on the server. the resizing works but I'm having a problem with renaming the files.
All this seems todo is change the original file on my harddisk in size and by name. I'm probably going to need some kind of buffer to do this.
Can anyone point me in the right direction please?
You didn't show us resizeImage(), so we can't tell what it does, but yes, this line:
will rename whatever on-disk file thumbnail represents to whatever the name of thumbnailren is. Just in case you don't know, let me point out that File objects don't necessarily represent an on-disk file (hence the exists() method). If you want two files on-disk, you will have to write out data twice. [ September 02, 2008: Message edited by: Joe Ess ]