Solved

Upload Image and preview

Posted on 2006-11-20
6
10,136 Views
Last Modified: 2008-01-09
Hi

How to upload image and preview the uploaded image before inserting into the DB

Thank you
0
Comment
Question by:mmsreddy
6 Comments
 
LVL 29

Accepted Solution

by:
bloodredsun earned 32 total points
ID: 17985805
Upload it using FileUpload, get the image as an inputstream and render it as an image for preview. Or store the resulting image in the session (possibly as a RenderedImage object) and then display that.

At what point you decide to store the image is up to you.
0
 
LVL 12

Assisted Solution

by:enachemc
enachemc earned 31 total points
ID: 17985922
After you upload the image you would have to store it somewhere where it is directly accessible by the web application and serve it to the client as if it were already a part of you web app or store the image in memory (to be read session), create a servlet that when called will output this image (use output stream instead of writer) and provide the neccessary header (content type), and provide the image as having the source your servlet.
0
 
LVL 5

Assisted Solution

by:deeppra
deeppra earned 31 total points
ID: 17986105
u can do that using the javascript .. get the file path and then dynamically update the image using javascript
0
 
LVL 10

Assisted Solution

by:jaggernat
jaggernat earned 31 total points
ID: 17991883
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Jquery - parsing the results returned from webmethod 1 124
gZip compression filter 2 182
JSONSerializer.toJSON in JSP generating error 8 89
junit example issue 2 27
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This article discusses how to implement server side field validation and display customized error messages to the client.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question