Skip to content
Snippets Groups Projects
Commit 723c6b72 authored by Gospodin Bodurov's avatar Gospodin Bodurov
Browse files

Merge branch '445-upload-files-with-cyrillic-in-the-name' into 'master'

[Upload doc] Trying to upload a odt or pdf with Cyrillic in the name of the file fails

See merge request !32
parents 295b905b 67199772
No related branches found
No related tags found
1 merge request!32[Upload doc] Trying to upload a odt or pdf with Cyrillic in the name of the file fails
...@@ -12,7 +12,7 @@ WopiAPI.prototype.getPassports = function (fileID) { ...@@ -12,7 +12,7 @@ WopiAPI.prototype.getPassports = function (fileID) {
uuid, uuid,
token, token,
deviceHash, deviceHash,
fileID fileID: encodeURI(fileID)
} }
}; };
...@@ -22,6 +22,7 @@ WopiAPI.prototype.getPassports = function (fileID) { ...@@ -22,6 +22,7 @@ WopiAPI.prototype.getPassports = function (fileID) {
WopiAPI.prototype.putDocument = function (path, accessToken, file) { WopiAPI.prototype.putDocument = function (path, accessToken, file) {
const { publicKey, uuid, token, deviceHash } = window.viamApi.getConfig().headers; const { publicKey, uuid, token, deviceHash } = window.viamApi.getConfig().headers;
path = path[0] === "/" ? path : `/${path}`; path = path[0] === "/" ? path : `/${path}`;
path = encodeURI(path);
const requestConfig = { const requestConfig = {
url: `${window.WOPI_URL}files${path}/contents`, url: `${window.WOPI_URL}files${path}/contents`,
method: 'POST', method: 'POST',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment