How to upload an image locally

A

alexdobrev

Hello, I am working on a project where I need to store images locally
on the server and references to them in Oracle10g. I need some help on
how to upload an image locally on the server from the client's machine.

I am using eclipse 3.2, tomcat 5.x and Oracle 10g.

Greetings,

A.D.
 
A

Andrew Thompson

Hello, I am working on a project where I need to store images locally
on the server and references to them in Oracle10g. I need some help on
how to upload an image locally on the server from the client's machine.

Since you failed to ask a question, I'll ask one or two..

OK.. so does this mean you'd like us to recommend a
good consultant? Or would you perhaps prefer to launch
into some tutorials, try hacking out some code, and come
back to us with specific questions? Some, other form of
help, maybe?

Or did I miss your point? Were you just after words of
support for your coming endeavour?

Try - 'Go, Team!'.

Andrew T.
 
M

Matt Humphrey

Hello, I am working on a project where I need to store images locally
on the server and references to them in Oracle10g. I need some help on
how to upload an image locally on the server from the client's machine.

I am using eclipse 3.2, tomcat 5.x and Oracle 10g.

I take it (because you're using tomcat) that you're talking about a web
application and the client is a browser. In HTML there is a <input
type="file" name="uploadfile" /> tag for forms that allow users to select a
file for uploading. In a POST request the file contents is copied within the
servlet request--you just read it from the input stream. I can't seem to
lay my hands on sample code right now, but you can figure it out from the
servlet API. Some online source code for file update is here
http://www.oop-reserch.com/cross_servlet.html

There is some good info here
http://www.theserverside.com/tt/articles/article.tss?l=HttpClient_FileUpload

Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
T

Tom Cole

Matt said:
I take it (because you're using tomcat) that you're talking about a web
application and the client is a browser. In HTML there is a <input
type="file" name="uploadfile" /> tag for forms that allow users to select a
file for uploading. In a POST request the file contents is copied within the
servlet request--you just read it from the input stream. I can't seem to
lay my hands on sample code right now, but you can figure it out from the
servlet API. Some online source code for file update is here
http://www.oop-reserch.com/cross_servlet.html

There are also two widely used, free libraries out there you can use to
read the files and other parameters from the stream for you:

Apache FileUpload: http://jakarta.apache.org/commons/fileupload/
O'reilly MultipartRequest: http://servlets.com/cos/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,043
Members
48,769
Latest member
Clifft

Latest Threads

Top