I'm absolutely stuck on this. This question might be more python than django related, but I figured because it deals with Amazon S3, someone here may know how to handle it.
Here's what needs to happen: 1. A user uploads an image (part of a Model we have) 2. Create a 100x100 thumbnail using PIL 3. Move the thumbnail to Amazon S3 Step 3 is the tricky part for me. I can't figure out how to do it, other than first temporarily saving the in-memory thumbnail to the filesystem, re-reading the file, moving the raw data to S3, and then deleting the temporary thumbnail file: # thumb is an already thumbnailed Image instance, in memory thumb.save( temp_path, "JPEG") raw = open( temp_path ).read() # code to move 'raw' to S3 os.remove( temp_path ) This is a pretty heavy way of doing it, and I'm desperate to find a better way of doing it but am absolutely out of ideas... The S3 API requires the file data to be in the format the open(myfile).read() returns (whatever that is). Is there a way to get the same data from an in-memory Image instance, so I don't need to save/re-read/delete each thumbnail file? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---