You have no such choice. If you specify Content-Disposition: attachment , the browser will download the file. How exactly does it depend on the browser. Safari or Chrome simply downloads the file to disk without any hint whatsoever . Other browsers ask. You cannot control it.
source share