feat: finalize mindspace service extraction phase a
This commit is contained in:
@@ -68,6 +68,12 @@ export function buildAbsoluteAssetImageUrl(
|
||||
return `${window.location.origin}${buildAssetImageUrl(asset)}`;
|
||||
}
|
||||
|
||||
export function buildAbsoluteAssetDownloadUrl(
|
||||
asset: Pick<MindSpaceAsset, 'id' | 'updatedAt'>,
|
||||
): string {
|
||||
return `${window.location.origin}/api/mindspace/v1/assets/${asset.id}/download?inline=1&viewer=0&v=${asset.updatedAt}`;
|
||||
}
|
||||
|
||||
/** Chrome blocks PDF rendering inside any sandboxed iframe. */
|
||||
export function assetPreviewUsesSandbox(mimeType: string) {
|
||||
return mimeType !== 'application/pdf';
|
||||
|
||||
Reference in New Issue
Block a user