Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FTP file from web-form via Servlet  RSS feed

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all.

I've got a problem which Im struggling to figure out. I'm trying to let users upload their videos using a Servlet but I want the file to go to a remote file server (not local). I know how to upload files from a web-form and I know how to FTP files but I dont know how to directly FTP a file from a web-form to a remote file server without the file going anywhere near the local server. Is this possible? The process is as follows...

web-form->FTP->remote file server. (the local file system must not be involved).

Help much appreciated!
 
Saloon Keeper
Posts: 4476
112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A web form submits to a servlet, no way around that. But the servlet can turn around and upload the file elsewhere via ftp, e.g. by using the Apache Commons Net library. The Apache Commons FileUpload library could be used to handle the servlet part of accepting the uploaded file.
 
Michael Portman
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:A web form submits to a servlet, no way around that. But the servlet can turn around and upload the file elsewhere via ftp, e.g. by using the Apache Commons Net library. The Apache Commons FileUpload library could be used to handle the servlet part of accepting the uploaded file.



Yeah I thought it wasn't possible. I'll just have to do it the traditional way then. Thanks for the help though!
 
Michael Portman
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:A web form submits to a servlet, no way around that. But the servlet can turn around and upload the file elsewhere via ftp, e.g. by using the Apache Commons Net library. The Apache Commons FileUpload library could be used to handle the servlet part of accepting the uploaded file.



...sorry forgot to add something... So your saying the file needs to be uploaded to the local server first? Before the file is FTP'd?
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!