resume upload wsgi script
Diez B. Roggisch
deets at nospam.web.de
Sun Aug 9 16:42:11 CEST 2009
> On Aug 9, 3:17 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>> gert schrieb:
>>> I working on a resume upload script and encountered the following
>>> sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' with text
>>> Content-Disposition: form-data; name="Filename"
>> You are treating a binary data column as if it were a string. That's
>> bogus, you need to use a blob column.
>> Also I wouldn't combine the uplodaded chunks until the full upload is
>> finished - and even then only if I actually need the data.
> And the best solution would be to use TEXT instead or some sort of
> SUBBIN that i do not know of in sqlite ?
No, the best solution would be to use "BLOB", and no SUB*-stuff, but
instead a 1:n-relation of chunks, that when the upload is finished you
can easily combine in python to one large blob, storing that in the DB
More information about the Python-list