# This didn't work. Displays "Save As" dialog twice, no image sent. print "Content-type: image/tiff\n"; print "Content-disposition: attachment; filename=image.tif\n\n"; print $buffer; # This kinda works. Displays "Save As" dialog twice, but image is # corruppted (see description in post). print "Content-Type: image/tiff; filename=image.tif\n"; print "Content-Disposition: attachment; filename=image.tif\n"; print "Content-Length: $filesize\n\n"; print $buffer; # Same result as above. print $request->header(-type => "image/tiff", -attachment=>'image.tif'), $buffer; # This almost works. Only displays "Save As" dialog once, image is # messed up though (see description in post). print "Content-Disposition: inline; filename=image.tif\n"; print "Content-Length: $filesize\n"; print "Content-Type: image/tiff\n\n"; print $buffer; # Same result as above, just done a bit differently. Changing the content # type did nothing for me. print $request->header(-Content_Disposition => "inline; filename=image.tif", -Content_Length => $filesize, -Content_Type => "application/octet-stream", ), $buffer;