This is a migrated thread and some comments may be shown as answers.

Uploading files with international file names

1 Answer 224 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Franz
Top achievements
Rank 1
Franz asked on 29 Jul 2014, 12:34 PM
It seems that the Kendo Upload control has a Problem with international file names. I.e. i select a file with the arbitrary name یاتلبمتیابنیب.docx, and the resulting POST request looks like this:

Headers:
Content-Length: 13439
Content-Type: multipart/form-data; boundary=---------------------------105252201922976
(...)

Content:
-----------------------------105252201922976
Content-Disposition: form-data; name="files"; filename="یاتلبمتیابنیب.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

(...)

It is clear the the file name is garbled within the Content-Disposition header within the part containing the file.

RFC2388, Section 4.4 specifies:
Forms may request file inputs from the user; the form software may
include the file name and other file attributes, as specified in [RFC
2184].

The original local file name may be supplied as well, either as a
"filename" parameter either of the "content-disposition: form-data"
header or, in the case of multiple files, in a "content-disposition:
file" header of the subpart. The sending application MAY supply a
file name; if the file name of the sender's operating system is not
in US-ASCII, the file name might be approximated, or encoded using
the method of RFC 2231.

This is a convenience for those cases where the files supplied by the
form might contain references to each other, e.g., a TeX file and its
.sty auxiliary style description.

This does not seem to happen here. As a result, kendo Upload's behavior with international filenames seems undefined.

This problem was witnessed with kendo UI Web, v2013.3.1119.

Any known workarounds?

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 30 Jul 2014, 08:20 AM
Hello,

Please check that the page encoding is set to UTF-8, as this is what will be used during the file upload.
A meta tag in the head should be sufficient:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

I hope this helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Upload
Asked by
Franz
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or