• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple File Upload from a directory

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
It will give me the powers of the gods. Not bad for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic