Yah, At first I also think like that but my supervisor want the image to be inserted to Mysql...
I tried the javazoom but I always have error which says it can not find the uploadbean class but I already paste the jar file to the classpath. but I haven't try the fileupload library and OReilly upload servlet.. any ideas how to solve this?
Main Topics
Browse All Topics





by: TimYatesPosted on 2004-10-26 at 02:28:50ID: 12408905
I would upload the image (uning an upload bean like the javazoom one, the jakarta FileUpload library, or the OReilly upload servlet), then:
1) create a temp filename for your uploaded images directory inside the web application (using File.createTempFile)
2) Save the image to this temp filename
3) store this temp filename, and the original filename in the mySQL database (as 2 strings fields)
You can then display the image inside normal <IMG tags (rather than having to extract them from the database, and streaming them to the browser using a servlet)
And the database will be smaller
Tim