Skip to content

Commit e5c92c3

Browse files
authored
Merge pull request #1192 from nextcloud/backport/1151/stable29
[stable29] Fix saving annotations in paths with special characters
2 parents 994d520 + b1f9d0a commit e5c92c3

9 files changed

+14
-10
lines changed

js/files_pdfviewer-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-node_modules_nextcloud_dialogs_dist_chunks_index-Ly0obkwS_mjs.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-node_modules_nextcloud_dialogs_dist_chunks_index-Ly0obkwS_mjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-CSmrMOEO_mjs.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-CSmrMOEO_mjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@nextcloud/dialogs": "^6.0.0",
3232
"@nextcloud/l10n": "^3.1.0",
3333
"@nextcloud/logger": "^3.0.2",
34+
"@nextcloud/paths": "^2.2.1",
3435
"@nextcloud/router": "^3.0.1",
3536
"pdfjs-dist": "4.0.189"
3637
},

src/services/uploadPdfFile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import { getRequestToken } from '@nextcloud/auth'
2525
import axios from '@nextcloud/axios'
26+
import { encodePath } from '@nextcloud/paths'
2627

2728
import { getRootPath, getToken } from '../utils/davUtils.js'
2829

@@ -43,7 +44,7 @@ import { getRootPath, getToken } from '../utils/davUtils.js'
4344
export default async function(filename, data) {
4445
// getRootPath takes into account the differences between files of
4546
// registered users and public shares.
46-
const filePath = getRootPath() + filename
47+
const filePath = getRootPath() + encodePath(filename)
4748

4849
const blob = new Blob([data], { type: 'application/pdf' })
4950

0 commit comments

Comments
 (0)