I have a Python cgi that converts a svg to a png file, I'd like then to download the converted output to the user's disk.
#the conversion stuff
print "Content-Type: image/png"
print "Content-Disposition: attachment; filename='pythonchart.png'"
print
print open("http:\\localhost\myproj\pythonchart.png").read()
This results in a png file containing ‰PNG
.
Any help please?