Re: Convert StreamResponse to Asset

2013-06-24 Thread Boris Horvat
Yea and when I think about it a bit more keeping it in memory will be a problem if the user is directed to a different server... OK I will solve this by uploading an image to some persistent storage (i.e. S3) and then server it as an asset. Thanks On Mon, Jun 24, 2013 at 10:38 AM, Lance Java wrot

Re: Convert StreamResponse to Asset

2013-06-24 Thread Lance Java
Firstly, it's dangerous to hold a reference to an UploadedFile instance after the request that created it has reached end of life. You must read the InputStream whilst the request is live and store it somewhere (either in a database, a blobstore or as a byte array in the HTTPSession etc). If you'd