views:

49

answers:

1

If you click view,you'll open that file in browser,

while download will pop up a dialog to save that file on your disk.

+1  A: 

Download vs View is controled by content-disposition header. Just add header below and you will get Save File dialog box.

content-disposition: attachment; filename=test.pdf
Mike Chaliy
What's the header for download and view respectively?
By default you will get view. If you will add header with name "content-disposition" and value "attachment; filename=test.pdf" you will get download.
Mike Chaliy
What about the `content-type`?
`content-type` is about MIME type of the resource, for example JPEG images are `image\jpeg`. More on the topic - http://en.wikipedia.org/wiki/Internet_media_type
Mike Chaliy