Re: compressing uploaded file

2011-04-20 Thread Daniel Gerzo
On 20.4.2011 17:56, Ian Clelland wrote: Well, an InMemoryUploadedFile isn't a real file, so I'm not surprised that that doesn't work. You'll have to pull the data out of it, and compress that. Try something like this: def handle_uploaded_subtitles(self, files): for uploaded_file in files:

Re: compressing uploaded file

2011-04-20 Thread Ian Clelland
On Wed, Apr 20, 2011 at 1:02 AM, Daniel Gerzo wrote: > On 20.4.2011 2:22, Julio Ona wrote: > >> Hi Daniel, >> >> you should see: >> http://docs.python.org/library/bz2.html#module-bz2 >> >> or >> http://docs.python.org/library/gzip.html#module-gz

Re: compressing uploaded file

2011-04-20 Thread Daniel Gerzo
On 20.4.2011 2:22, Julio Ona wrote: Hi Daniel, you should see: http://docs.python.org/library/bz2.html#module-bz2 or http://docs.python.org/library/gzip.html#module-gzip Hello Juliom, thanks for reply. I have of course seen both of these be

Re: compressing uploaded file

2011-04-19 Thread Julio Ona
Hi Daniel, you should see: http://docs.python.org/library/bz2.html#module-bz2 or http://docs.python.org/library/gzip.html#module-gzip But basically you should import the compress function from the library and use it.