Skip to content
Snippets Groups Projects
Commit 67199772 authored by Alexey Lunin's avatar Alexey Lunin
Browse files

Encode file paths

parent f867fe34
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) {
uuid,
token,
deviceHash,
fileID
fileID: encodeURI(fileID)
}
};
......@@ -22,6 +22,7 @@ WopiAPI.prototype.getPassports = function (fileID) {
WopiAPI.prototype.putDocument = function (path, accessToken, file) {
const { publicKey, uuid, token, deviceHash } = window.viamApi.getConfig().headers;
path = path[0] === "/" ? path : `/${path}`;
path = encodeURI(path);
const requestConfig = {
url: `${window.WOPI_URL}files${path}/contents`,
method: 'POST',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment