On Thu, Jun 18, 2015 at 1:48 PM, Paul Hubert <phbr...@gmail.com> wrote: >> # Now: >> gz = '/Users/Paul/Desktop/scripts/pic.jpg.gz' >> with open(dafile, 'rb') as f_in, gzip.open(gz, 'wb') as f_out: >> f_out.write(f_in.read()) >> > > Same result - server says malformed upload. :/
Oh well, was worth a shot. Since the file's sitting around still, you should be able to attempt to decompress it with the stand-alone gzip command; does that give the right result? Also, you should be able to manually send that .gz file up to the server, which would be worth confirming. Are you certain that the content should be gzipped as a file? It's not meant to be done as a transfer-level encoding? ChrisA -- https://mail.python.org/mailman/listinfo/python-list