Hello, I am trying to get an ASP script to download a file. The file arrives at the correct size but is corrupted, what am I missing? If I run the get_file function directly at the command prompt and save the resulting data it is fine, so there must be something wrong with the way I send the data from the browser?
If have this code in the asp page: <% ... filename,data = get_file(file_path) Response.AddHeader("content-disposition","attachment; filename=%s" % (filename,)) Response.ContentType="application/zip" Response.BinaryWrite(buffer(data)) %> the get_file function just does this: def get_file(path): file = open(path,"rb") data = file.read() file.close() return os.path.split(path)[1],data Any pointers will be greatfully recieved. Thanks, Emlyn. _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32