Uploading files with international file names

2 posts, 0 answers
  1. Franz
    Franz avatar
    5 posts
    Member since:
    Aug 2011

    Posted 29 Jul 2014 Link to this post

    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?
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 30 Jul 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top