2

I have an embedded system with a web server Mongoose, I have to allow the client to download some log files generated at runtime, I have a problem during the download, in practice, the browser first downloads the file and then asks where to save the file . The behavior is unpleasant because the download takes a few seconds and the client does not understand what's going on. Is there any option, for example, in the header of the file, to force the browser to ask before making the download where to save the file?

Thanks.

mpromonet
  • 11,326
  • 43
  • 62
  • 91
ajima
  • 21
  • 3

1 Answers1

2

it is not up to you to decide how the client's browser is behaving. if the browser is set to save the file automatically in a specific place, then there is nothing you can do.

your only workarounds is to either upload your file somewhere and suggest the viewer to right-click a download link that points to the file, it will open the dialog,

or suggest the viewer to change browser settings,

or write a browser extension that does that and offer viewers to install it.

Banana
  • 7,424
  • 3
  • 22
  • 43
  • Hi, thanks for your answer but this problem is present also when the browser is set in "ask file position mode". – ajima Mar 13 '14 at 15:32
  • oh sorry i misread your question. it is the same case however, you cannot tell the browser what to do due to security reasons. if the browser download the file first, it is probably due to opimization set by the browser. search its settings to see if you can change it, but you are unable to do it from your website. – Banana Mar 13 '14 at 15:35
  • Thanks again, I thought it was a problem with the web server (since it is not that of a canonical type Apache or IIS). – ajima Mar 13 '14 at 15:40