Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix saving annotations in paths with special characters #1151

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/files_pdfviewer-main.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions js/files_pdfviewer-main.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/logger
- version: 3.0.2
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.2.1
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.0.1
- license: GPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion js/files_pdfviewer-main.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/logger
- version: 3.0.2
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.2.1
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.0.1
- license: GPL-3.0-or-later
Expand Down

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@nextcloud/dialogs": "^6.1.1",
"@nextcloud/l10n": "^3.2.0",
"@nextcloud/logger": "^3.0.2",
"@nextcloud/paths": "^2.2.1",
"@nextcloud/router": "^3.0.1",
"@nextcloud/sharing": "^0.2.4",
"pdfjs-dist": "^4.0.189"
Expand Down
3 changes: 2 additions & 1 deletion src/services/uploadPdfFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
import { getRequestToken } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
import { encodePath } from '@nextcloud/paths'

import { getRootPath } from '../utils/davUtils.js'
import { getSharingToken } from '@nextcloud/sharing/public'
Expand All @@ -25,7 +26,7 @@ import { getSharingToken } from '@nextcloud/sharing/public'
export default async function(filename, data) {
// getRootPath takes into account the differences between files of
// registered users and public shares.
const filePath = getRootPath() + filename
const filePath = getRootPath() + encodePath(filename)

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

Expand Down