File Download Recipe

How to download a file?

Server

server.go



Client

index.html



How to download a file as inline, opening it in the browser?

Server

server.go



Client

index.html



How to download a file as attachment, prompting client to save the file?

Server

server.go



Client

index.html