Skip to content

Commit

Permalink
Merge pull request #10813 from owncloud/fix-downloads-special-chars
Browse files Browse the repository at this point in the history
fix: download of files with special chars
  • Loading branch information
kulmann authored Apr 22, 2024
2 parents bf741e3 + 503faf3 commit 9c75a83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-download-files-special-chars
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Download files with special chars in name

We've fixed a bug where having a `#` in the filename resulted in requests going to cut off urls.

https://github.com/owncloud/web/issues/10810
https://github.com/owncloud/web/pull/10813
5 changes: 3 additions & 2 deletions packages/web-pkg/src/composables/download/useDownloadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { unref } from 'vue'
import { usePublicLinkContext } from '../authContext'
import { useClientService } from '../clientService'
import { useStore } from '../store'
import { triggerDownloadWithFilename } from '../../../src/helpers'
import { triggerDownloadWithFilename } from '../../helpers'
import { useGettext } from 'vue3-gettext'
import { useCapabilityCoreSupportUrlSigning } from '../capability'
import { Store } from 'vuex'
import { ClientService } from '../../services'
import { encodePath } from '../../utils'

export interface DownloadFileOptions {
store?: Store<any>
Expand Down Expand Up @@ -42,7 +43,7 @@ export const useDownloadFile = (options?: DownloadFileOptions) => {
// construct the download url
const url =
version === null
? `${client.helpers._davPath}${file.webDavPath}`
? `${client.helpers._davPath}${encodePath(file.webDavPath)}`
: client.fileVersions.getFileVersionUrl(file.fileId, version)

// download with signing enabled
Expand Down

0 comments on commit 9c75a83

Please sign in to comment.