• 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

Download File in specified directory

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello..
Would like to know if there is a way for a web application to allow file download without displaying "Open/Save" dialog box and instead automatically dump the file in a specified directory, say for instance, client C:\ directory or in another location in the network.

Appreciate any ideas because i'm still very unfamiliar on how to implement this and if it is really possible.
Thanks in advance!
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(Not a general Java question - maybe HTML/JavaScript?)

I certainly hope what you suggest cannot be done. If it could, bad people would find it even easier to craft Web sites that save all sorts of nasties onto the user's disk.

Any good browser should make it very clear to a user when something is being downloaded to their disk and should give them an option to say "no".
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Peter says, what you describe is certainly not possible and would be a huge security risk if it were possible.
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only way I could imagine this could ever happen is by using a signed applet - which already requires the user to give the applet permission to access the local machine.
 
Kevin Valencia
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Security wise, the web app will only be deployed in an intranet site, which assumes that it is a trusted site. Might explore on signed applets then. Would just like to know if it can allow write access to other machines in the network aside from the client/local machine. Thanks again...
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have given this a lot of thought, because I am trying to do something vaugely like what you say - and have decided that I have to write both ends. Else it becomes a nightmare scenario such as the others are warning of and has been repeatedly discussed in and out of internet security discussions.

By writing both ends and having the whole concepting available to you, you will find the traditional approach to this is make some 'folder' to be 'root' as presented to the outside world. There are file transfer sample projects, but it takes a lot of diggin to get a sane and sufficient implementation. Cay S. Horstman - core Java - Sun Microsystems Press has a very good discussion of this.
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic