It depends on what your server (script) accepts, when sending you should add headers with name of your file, this can be:
Content-Disposition: attachment; filename="fname.ext"
example from http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html "19.5.1 Content-Disposition"