Solved

Upload Image and preview

Posted on 2006-11-20
6
10,113 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
gZip compression filter 2 146
doubleChar java challenge 7 106
How to find missing packages when using Netbeans IDE 8.1 ? 19 51
struts spring hibernate example 12 122
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

776 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