How to download a file without save/open dialogue box ?
lokesh pattajoshi
Ranch Hand
Joined: Jul 29, 2009
Posts: 130
posted
0
Hi everybody,
i am using below code to only download PDF and DOC file to loacal system but problem is it is showing save/open dialogue box which is not meeting my requirment..can any body please tell me how can i download a file without that dialogue box..?
No. And if there was, I'd get really, really angry that you were bypassing my browser preferences and not allowing me to choose where to download it instead of defaulting to the browser's configured download directory.
Why would you want to have this capability? I can't think of any non-suspicious reason.
lokesh pattajoshi
Ranch Hand
Joined: Jul 29, 2009
Posts: 130
posted
0
Actually we have two buttons called View and Downloads of some documents if user is clicking on View than it should(only pdf docs)open in web browser and if user is clicking Download than it should be downloaded..
That doesn't answer the question, though. And it *can* be downloaded--but wanting to bypass the preferences *I* have set is an invasion of my computer.
To be even more blunt than David: Do you know what they call code that is downloaded and executed surreptitiously?
Viruses.
Customer surveys are for companies who didn't pay proper attention to begin with.
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
Presumably you're trying to make your users happy. What you need to do is educate them that this is a browser setting - then they can configure their browsers to either show the dialog, or save the file automatically. That way they have a choice, and you don't need to program anything - now that's a win-win situation!
Tim Holloway wrote:Do you know what they call code that is downloaded and executed surreptitiously?
I don't see any reference to code being downloaded and executed ...
In theory, you can download data without worrying about it being executed as code. In reality, that's not a safe bet.
Not that clandestine downloads of data are innocuous either. The old Unix "lpt" daemon was a security issue because hostile users could do a denial-of-service by jamming in large print jobs. Consider what your response would be if I set up my server to offer up files that were 3TB in size and didn't notifiy you.
It won't, but it's also not the same as downloading it--that would view it in the browser.
Basu Ramanan
Greenhorn
Joined: Sep 14, 2010
Posts: 2
posted
0
David
lokesh pattajoshi wrote:Actually we have two buttons called View and Downloads of some documents if user is clicking on View than it should(only pdf docs)open in web browser and if user is clicking Download than it should be downloaded..
I think thats what Lokesh needs, by download without save/open dialog he means, view the content in web browser.
lokesh pattajoshi wrote:how can i download a file without that dialogue box..?
and later
lokesh pattajoshi wrote:Actually we have two buttons called View and Downloads of some documents if user is clicking on View than it should(only pdf docs)open in web browser and if user is clicking Download than it should be downloaded..
So I'm pretty sure we're addressing the question as it was originally asked.