mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-23 20:13:20 +00:00
fix: do not resolve storage provider in getUrl (#6361)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
84803fa372
commit
5d41a873d1
@ -10,8 +10,8 @@ import core, {
|
||||
type WorkspaceId
|
||||
} from '@hcengineering/core'
|
||||
import { type Readable } from 'stream'
|
||||
import { type RawDBAdapter } from '../adapter'
|
||||
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import {
|
||||
type BlobStorageIterator,
|
||||
type BucketInfo,
|
||||
@ -20,6 +20,9 @@ import {
|
||||
type StorageAdapterEx,
|
||||
type UploadedObjectInfo
|
||||
} from '@hcengineering/storage'
|
||||
|
||||
import { type RawDBAdapter } from '../adapter'
|
||||
import serverCore from '../plugin'
|
||||
import { type StorageConfig, type StorageConfiguration } from '../types'
|
||||
|
||||
class NoSuchKeyError extends Error {
|
||||
@ -367,8 +370,10 @@ export class AggregatorStorageAdapter implements StorageAdapter, StorageAdapterE
|
||||
|
||||
@withContext('aggregator-getUrl', {})
|
||||
async getUrl (ctx: MeasureContext, workspaceId: WorkspaceId, name: string): Promise<string> {
|
||||
const { provider, stat } = await this.findProvider(ctx, workspaceId, name)
|
||||
return await provider.getUrl(ctx, workspaceId, stat.storageId)
|
||||
// const { provider, stat } = await this.findProvider(ctx, workspaceId, name)
|
||||
// return await provider.getUrl(ctx, workspaceId, stat.storageId)
|
||||
const filesUrl = getMetadata(serverCore.metadata.FilesUrl) ?? ''
|
||||
return filesUrl.replaceAll(':workspace', workspaceId.name).replaceAll(':blobId', name)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user