File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Uploading files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Uploading files" Watch "Uploading files" New topic
Author

Uploading files

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 823
What do I need to do to set up a simple file upload on a plain HTML webpage? I saw the input type of file but what else is needed to incorporate this? Thanks in advance.

Rob
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

You also need to set the enctype of the form to multipart/form-data.

Then, of course, you need server-side code to parse the multi-part form.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 823
Alright I saw the encrypt afterwards but I was hoping that I didn't need a script to accept it. Do you know of any "free" modules for accepting multi-part form data in Perl or Java? I know it's not PerlRanch but I might as well ask it . Thanks.

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
This is always a good place to start!

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

Originally posted by Rob Hunter:
Alright I saw the encrypt afterwards...

"enc" doesn't stand for encrypt, but rather encode.

Do you know of any "free" modules for accepting multi-part form data in Perl or Java?

If using Java, there's a handy FAQ entry in the JSP FAQ on just this topic.
[ December 20, 2007: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uploading files