M
Michael Foord
I'm creating a CGI that offers files for download. After googling I
though I had the right headers to send to force a download - but it
sends the data to the browser instead of opening the download 'save
file' dialog. Can anyone see what I'm doing wrong/suggest an
alternative ?
responseline = '''Content-Type: application/octet-stream
Content-Disposition: attachment; filename=%s
Content-Length: %s
'''
print responseline % (filename, len(filedata))
print filedata
TIA
Fuzzy
http://www.voidspace.org.uk/atlantibots/pythonutils.html
though I had the right headers to send to force a download - but it
sends the data to the browser instead of opening the download 'save
file' dialog. Can anyone see what I'm doing wrong/suggest an
alternative ?
responseline = '''Content-Type: application/octet-stream
Content-Disposition: attachment; filename=%s
Content-Length: %s
'''
print responseline % (filename, len(filedata))
print filedata
TIA
Fuzzy
http://www.voidspace.org.uk/atlantibots/pythonutils.html