473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to upload an image using a file browser from a basic client?

Good morning.

I would like to allow a user to browse his local file system, choose an
image (probably .jpeg) file, and upload it to the server (using a servlet) -
the
same functionality that online datiing agencies use to let people save their
photograph with their profiles. (My application is an online Want Ads.)

I feel that this must be possible within a minimal client (without a JVM)
using nothing more than HTML and JavaScript, but I'll be damned if I can
find how.

Would one of you more experienced Java people mind pointing me in the
right direction.

Thank you,
Ron.



Jul 17 '05 #1
3 10871
On the JavaScript, Murry provided the following solution:
http://www.jguru.com/faq/view.jsp?EID=160
"Ron Brennan" <rb******@magma.ca> wrote in message
news:aJ********************@magma.ca...
Good morning.

I would like to allow a user to browse his local file system, choose an
image (probably .jpeg) file, and upload it to the server (using a servlet) - the
same functionality that online datiing agencies use to let people save their photograph with their profiles. (My application is an online Want Ads.)

I feel that this must be possible within a minimal client (without a JVM)
using nothing more than HTML and JavaScript, but I'll be damned if I can
find how.

Would one of you more experienced Java people mind pointing me in the
right direction.

Thank you,
Ron.


Jul 17 '05 #2

"Ron Brennan" <rb******@magma.ca> wrote in message
news:rp********************@magma.ca...
On the JavaScript, Murry provided the following solution:
http://www.jguru.com/faq/view.jsp?EID=160


MurrAy ;-)

I'd recommend using the Commons Multipart Upload package
http://jakarta.apache.org/commons/fileupload/

If you're using Struts it's even easier :-)
Jul 17 '05 #3

"Murray" <pa***@SPAMoffSPAMMER.optusSP4Mnet.com.au> wrote in message
news:40***********************@news.optusnet.com.a u...

"Ron Brennan" <rb******@magma.ca> wrote in message
news:rp********************@magma.ca...
On the JavaScript, Murry provided the following solution:
http://www.jguru.com/faq/view.jsp?EID=160
MurrAy ;-)

I'd recommend using the Commons Multipart Upload package
http://jakarta.apache.org/commons/fileupload/

If you're using Struts it's even easier :-)


Got it; thanks again!

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
2
by: Gary \(Girish\) | last post by:
Hello: I am using SA-FileUp to enable members to upload their product images to my ISP sever. When member uploaded a new image file, the file name is replaced with the member ID and the old file...
5
by: bob garbados | last post by:
I am trying to create a database-driven photo gallery for a friend with an admin form to upload images... I can upload a file to the web server, but I want to store the image in a database and I...
3
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
4
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image...
3
acoder
by: acoder | last post by:
How to Upload a File in Coldfusion Use the cffile tag for uploading files to the server. Note that allowing people to upload files is fraught with danger and only trusted users should be...
9
by: Steve Poe | last post by:
I work for an animal hospital trying to use PHP to store an animal's dental x-rays to a file server. I can browse for the xray on the local desktop computer then click "Upload Image". This...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
18
jhardman
by: jhardman | last post by:
Have you ever wanted to upload files through a form and thought, "I'd really like to use ASP, it surely has that capability, but the tutorial I used to learn ASP didn't mention how to do this."? ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.