Browser download file prompt using javascript

Posted by aix on Stack Overflow See other posts from Stack Overflow or by aix
Published on 2009-04-07T18:57:26Z Indexed on 2010/04/01 10:33 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

hi, I was wondering if there was any method to implement browser's download file prompt using javascript. My reason - well users will be uploading files to a local fileserver which cannot be accessed from the webserver. In other words, both will be on different domains! e.g. let’s say websites hosted on www.xyz.com, but files would reside on local file server with address like \10.10.10.01\Files\file.txt. How am I uploading/transferring file to local fileserver... using ACTIVEX(yikes) & VBscript!!!! (don’t ask :-)

so i am storing local file path in my database and binding that data to a grid. So when the user clicks on that link, the file opens in a window (using javascript).

Problem is certain file types like text, jpg, pdf, etc open inside browser window. How would i be able to implement content-type or content-disposition using client side scripting? Is that even possible?

hoping my description was clear. Any ideas?

EDIT: the local file server has a window's shared folder on which the files are saved.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about file