agea / CmisJS

A CMIS javascript library for node and browser
MIT License
38 stars 34 forks source link

Allow to specify the charset used for non-file fields posted int mult… #46

Closed lmignon closed 7 years ago

lmignon commented 7 years ago

…ipart/form-data

If you post a file with properties to update into the same multipart/form-data, you must be able to specify the charset used for your non-file fields to avoid a wrong decoding by the server. The HTML specs specifies the use of a pseudo field 'charset' to do it (https://dev.w3.org/html5/spec-preview/attributes-common-to-form-controls.html#attr-fe-name-charset). If the library is used into a browser, you can specify the charset by calling the new method 'setCharacterSet' on the session object (ie: mySession.setCharacterSet(document.characterSet);)