summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-10-03 16:49:49 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-10-03 18:11:03 +0200
commitd79e26b25a4a5f3e692439d9ab913f0e078a7785 (patch)
tree79e5a22946221d9d5f873040e00431809daba239 /apps/files_trashbin
parent8f30f976425d6ee933cfc47cb5ed82d827ff5106 (diff)
downloadnextcloud-server-d79e26b25a4a5f3e692439d9ab913f0e078a7785.tar.gz
nextcloud-server-d79e26b25a4a5f3e692439d9ab913f0e078a7785.zip
fix(files): encoded source path on actions requests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/src/actions/restoreAction.ts2
-rw-r--r--apps/files_trashbin/src/services/trashbin.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_trashbin/src/actions/restoreAction.ts b/apps/files_trashbin/src/actions/restoreAction.ts
index ab9ac784d7f..e03573a75a6 100644
--- a/apps/files_trashbin/src/actions/restoreAction.ts
+++ b/apps/files_trashbin/src/actions/restoreAction.ts
@@ -54,7 +54,7 @@ registerFileAction(new FileAction({
const destination = generateRemoteUrl(encodePath(`dav/trashbin/${getCurrentUser()?.uid}/restore/${node.basename}`))
await axios({
method: 'MOVE',
- url: node.source,
+ url: node.encodedSource,
headers: {
destination,
},
diff --git a/apps/files_trashbin/src/services/trashbin.ts b/apps/files_trashbin/src/services/trashbin.ts
index d9ac3c7c70c..9aef75ef6d5 100644
--- a/apps/files_trashbin/src/services/trashbin.ts
+++ b/apps/files_trashbin/src/services/trashbin.ts
@@ -46,7 +46,7 @@ const resultToNode = function(node: FileStat): File | Folder {
const nodeData = {
id: node.props?.fileid as number || 0,
- source: generateRemoteUrl(encodePath('dav' + rootPath + node.filename)),
+ source: generateRemoteUrl('dav' + rootPath + node.filename),
// do not show the mtime column
// mtime: new Date(node.lastmod),
mime: node.mime as string,