Here you go,

------------------------------
class UploadStorage(db.Model):
    def __init__(self, field_name, file_name, content_type, content_length,
charset):
        self.content = db.BlobProperty(required=True)
        self.last_change = db.DateTimeProperty(required=True, auto_now=True)
        self.field_name = db.StringProperty(required=True, default=u'')
        ......

        if (field_name):
            self.field_name = field_name

    def append(self, src):
        self.content += src
-------------------------------------
class GAEUploadedFile(UploadedFile):
    def __init__(self, field_name, file_name, content_type, content_length,
charset):
        self.__storage = UploadStorage(field_name, file_name, content_type,
content_length, charset)
        ......

     def write(self, content):   # append
        self.__storage.append(content)
        self.size = len(self.__storage.content)

Thanks,

Will

On Tue, Jan 27, 2009 at 7:47 AM, Alexander Kojevnikov <
alexan...@kojevnikov.com> wrote:

>
> > No, doesn't work. I got
> >
> > unsupported operand type(s) for +=: 'BlobProperty' and 'str'
> >
> > Same as before.
> >
> Could you post here all related code, including the construction of a
> Storage entity?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to