Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

To Save a file in a different location

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In my project i have a requirement. The user will upload any kind of image. The image has to be stored in a different location. How can i do it? I'm able to browse and select the image using html. But how to read the file and store it in a different location?
 
Sheriff
Posts: 21997
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Upload to what? A web server? Running JSP / servlets, or what?
 
Ranch Hand
Posts: 30
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope this code will help you to upload any file type to any location
you need to modify the the code according to your project.




K.Anutosh
---------------------------------------------------------------------------
SCJP 1.4
SCWCD 1.4
OCA (Paper I)

[edit]Add code tags. CR[/edit]
[ October 13, 2008: Message edited by: Campbell Ritchie ]
 
Steph Sam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thanks for your reply. I need to upload the image from the user's machine to the server
 
Marshal
Posts: 70210
280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please use the code button, Anutosh Swamy; I have added the tags so you can see how much better the posting looks.

CR
 
Anutosh Swamy
Ranch Hand
Posts: 30
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Campbell Ritchie,

Thanks for correcting my mistake, this will be surly taken care of in future.
[ October 20, 2008: Message edited by: Anutosh Swamy ]
 
Get me the mayor's office! I need to tell him about this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic