Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading files

 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey folks,

i have to upload files from the clients machine to the server.
in some cases there is one file that must be uploaded from a web page, in others there should be a possibility to upload a number of files together.

i think apache.commons.fileupload project has a nice feature
for multi-file uploads. but! the files must be uploaded from a form
with ENCTYPE="multipart/form-data"... and i have tens of other text params that should be delivered by a regular request (with a content type "text/html")... does anyone know a tricky way to send this mixed stuff together ? thanks!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the FileItem.isFormField() method.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moreover, look at http://jakarta.apache.org/commons/fileupload/using.html.
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup, thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic