• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Uploading from a web page

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an administration page for a site where I need the user to be able to upload an image from their local drive. Can someone give me some direction on how to do this? I can get as far as putting in a browse button and letting them select the file, but how do I handle this on the server side?
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read the file in . . .
Write the file out . . .
Or am I missing something here?
 
Ben Roy
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I read a file in from the request object?
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try reading this from the I/O forum.
 
Ben Roy
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think we're still missing something. Let me walk you through a scenario:
Customer_A logs into the web site via Internet Explorer. Let's say the web server is at my site. Customer_A goes into the products administration page and clicks on "add". A form comes up which has fields for product name, description, price, etc. There is also an image field. Next to it is a browse button. They click browse, navigate to the image on *their* computer, then submit the form and the file is uploaded to the *server*. What I'm trying to figure out is, on the page that the form submits to (jsp or servlet) how can I receive that file out of the request object.
 
I don't like that guy. The tiny ad agrees with me.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic