• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple File Upload from a directory

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day!

Is it feasible to upload all the files in a specified directory to a
database?

I have tried file upload but it has the "browse" button for the files
to upload.

This time, I want to do it automatically that when the program starts,
all the contents of a specified directory will be uploaded.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you posted this to the "Servlets" forum, I'm assuming that by "program" you mean a web application. In that case, no, this is not possible. And that's a good thing, too - think of the security implications if it were possible to upload user files automatically to a remote site.

Using the manual file selection via the "Browse..." button is the only way, and since that doesn't allow to select directories, it is not possible to upload a complete directory.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Yes, I am doing a web application. The sequence of my program is this, I have an applet that uploads files from client to server's file system. Now, I will validate/parse the contents of the said folder after which I will transfer the valid files to a specified folder for it to be uploaded to the database. What I am asking is that is it possible that I will upload the valid files one by one from the directory without using the "browse" button? I don't want to upload the whole directory.

Thanks again.

God bless.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, if you are using a signed applet then it can do anything with the client's files that it likes. Assuming of course that the client accepts the notification the first time they download the applet.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Paul!

So I guess, the final answer to the question "Can I upload the files FROM a directory to the database?" is: YES?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic