Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Chrome to open an "open file dialog" when downloading a file vía ASP.NET codebehind?

I have a page that sends a binari file, pdf, word or excel to web browser. In firefox, and IE both opens a dialog asking what do you whant to do with this file, "open" or "save"

enter image description here

but Chrome directly save it to your computer.

Is it possible to make Chrome ask you what do you want to do with this file, placing some metadata into web response before sending the file to browser?

like image 474
anmarti Avatar asked Dec 18 '12 12:12

anmarti


People also ask

How do I get Chrome to open links instead of downloading?

To make certain file types OPEN on your computer, instead of Chrome Downloading... You have to download the file type once, then right after that download, look at the status bar at the bottom of the browser. Click the arrow next to that file and choose "always open files of this type".


1 Answers

It isn't possible to force Chrome to prompt the save dialog. The user has to change that behavior on chrome's configuration (advanced settings).

enter image description here

like image 109
daniloquio Avatar answered Sep 18 '22 14:09

daniloquio