Solved

Upload Image and preview

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now