You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2021/07/14 13:00:25 UTC

[sling-org-apache-sling-app-cms] branch master updated: SLING-10611 - Adding UTF-8 to upload parameters

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new a812816  SLING-10611 - Adding UTF-8 to upload parameters
a812816 is described below

commit a812816c817aa252b61b0e69d9e3374c3ae193a7
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Wed Jul 14 09:00:15 2021 -0400

    SLING-10611 - Adding UTF-8 to upload parameters
---
 ui/src/main/frontend/js/cms.fields.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ui/src/main/frontend/js/cms.fields.js b/ui/src/main/frontend/js/cms.fields.js
index 5ff4321..11a9b8b 100644
--- a/ui/src/main/frontend/js/cms.fields.js
+++ b/ui/src/main/frontend/js/cms.fields.js
@@ -32,8 +32,9 @@ rava.bind('.file', {
       function uploadFile(meter, action, file) {
         const formData = new FormData();
 
-        formData.append('*', file);
-        formData.append('*@TypeHint', 'sling:File');
+        formData.append("*", file);
+        formData.append("*@TypeHint", "sling:File");
+        formData.append("_charset_", "utf-8");
 
         const xhr = new XMLHttpRequest();
         xhr.upload.addEventListener('loadstart', () => {