• 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
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

To Save a file in a different location

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 22862
132
Eclipse IDE Spring TypeScript Quarkus Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 80874
506
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic