[Zope] Re: Re: File uploads: filename with ';'
Vova
kv11111 at mail.ru
Wed Oct 27 04:20:46 EDT 2004
Tino Wildenhain wrote:
>> Simple script:
>>
>> return context.REQUEST.file.filename
>>
>> Now let's create the form for it and upload file "a;b".
>> This script will return '"a' what is obviously not correct.
>> Filename is used, for example, as ID for newly created File object.
>> A lot of more realistic examples can be found in Plone.
>
> whatever Zope gives you as "filename" here comes from
> the browser. So either the browser strips your filename
> with ; in it (see with tcpflow or shanes tcpwatch)
> or the browser doesnt do the quoting right.
No, this is not browser mistake. This is part of output from netcat -l -p
8080:
Content-Disposition: form-data; name="file"; filename="a;b"
Content-Type: application/x-zerosize
So filename is sent correctly as 'a;b'. But Zope says that filename is '"a'.
--
Vladimir
More information about the Zope
mailing list