-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9862 from owncloud/pick-hotfix-for-7.1.1
chore: cherry-pick hotfix and prepare release 7.1.1
- Loading branch information
Showing
8 changed files
with
168 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Bugfix: Resolving external URLs | ||
|
||
Resolving external URLs when only the file ID is given has been fixed. | ||
|
||
https://github.com/owncloud/web/issues/9804 | ||
https://github.com/owncloud/web/pull/9833 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './useLoadFileInfoById' |
38 changes: 38 additions & 0 deletions
38
packages/web-pkg/src/composables/fileInfo/useLoadFileInfoById.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ClientService } from 'web-pkg/src/services' | ||
import { useClientService } from 'web-pkg/src/composables' | ||
import { useTask } from 'vue-concurrency' | ||
import { buildSpace, buildWebDavSpacesPath } from 'web-client/src/helpers' | ||
import { DavProperty } from 'web-client/src/webdav/constants' | ||
|
||
export interface LoadFileInfoByIdOptions { | ||
clientService?: ClientService | ||
davProperties?: DavProperty[] | ||
} | ||
|
||
export const useLoadFileInfoById = (options: LoadFileInfoByIdOptions) => { | ||
const { webdav } = options.clientService || useClientService() | ||
const davProperties = options.davProperties || [ | ||
DavProperty.FileId, | ||
DavProperty.FileParent, | ||
DavProperty.Name, | ||
DavProperty.ResourceType | ||
] | ||
|
||
const loadFileInfoByIdTask = useTask(function* (signal, fileId: string | number) { | ||
const space = buildSpace({ | ||
id: fileId, | ||
webDavPath: buildWebDavSpacesPath(fileId) | ||
}) | ||
return yield webdav.getFileInfo( | ||
space, | ||
{}, | ||
{ | ||
davProperties | ||
} | ||
) | ||
}) | ||
|
||
return { | ||
loadFileInfoByIdTask | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters