feat: implement preview mechanism
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -203,6 +203,11 @@ export function useDocumentManager(options: UseDocumentManagerOptions) {
|
||||
return `${TRANSFER_BASE_URL}/download/entity/${encodeURIComponent(currentProviderId())}/${encodeURIComponent(currentServiceId())}/${encodeURIComponent(collection)}/${encodeURIComponent(entityId)}`
|
||||
}
|
||||
|
||||
const getEntityPreviewUrl = (entityId: string, collectionId?: string | null): string => {
|
||||
const collection = collectionId ?? currentLocation.value
|
||||
return `${TRANSFER_BASE_URL}/preview/entity/${encodeURIComponent(currentProviderId())}/${encodeURIComponent(currentServiceId())}/${encodeURIComponent(collection)}/${encodeURIComponent(entityId)}?variant=popover`
|
||||
}
|
||||
|
||||
// Download a single file
|
||||
const downloadEntity = (entityId: string, collectionId?: string | null): void => {
|
||||
const collection = collectionId ?? currentLocation.value
|
||||
@@ -280,6 +285,7 @@ export function useDocumentManager(options: UseDocumentManagerOptions) {
|
||||
readFile,
|
||||
writeFile,
|
||||
getEntityUrl,
|
||||
getEntityPreviewUrl,
|
||||
downloadEntity,
|
||||
downloadCollection,
|
||||
downloadArchive,
|
||||
|
||||
Reference in New Issue
Block a user