mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 03:38:21 +00:00
fix(transcode): co-locate screenshots and derived artifacts in asset storage directory (#399)
* fix(transcode): co-locate screenshots and derived artifacts in asset storage directory * refactor(transcode): centralize derived artifact directory resolution and strengthen upload assertions
This commit is contained in:
@@ -2,7 +2,7 @@ import { prisma, WorkflowTaskType, WorkflowTaskStatus } from '@shumai/db'
|
||||
import { s3Service } from '@shumai/core/src/s3/s3'
|
||||
import { transcodeService } from '@shumai/core/src/transcode/transcode'
|
||||
import { metadataService } from '@shumai/core/src/metadata/metadata'
|
||||
import { stemFromKey } from '@shumai/core/src/utils/filename'
|
||||
import { getDerivedArtifactDirectory, stemFromKey } from '@shumai/core/src/utils/filename'
|
||||
import { gotenbergService } from '@shumai/core/src/gotenberg/gotenberg'
|
||||
import { parseCsvContent } from '@shumai/core/src/transcode/transcode'
|
||||
import {
|
||||
@@ -535,7 +535,8 @@ export async function generatePdfProxyActivity(
|
||||
}
|
||||
|
||||
const bucket = process.env.S3_BUCKET || 'shumai'
|
||||
const pdfProxyKey = `files/${params.assetId}/proxy.pdf`
|
||||
const assetDir = getDerivedArtifactDirectory(params.assetKey, params.assetId)
|
||||
const pdfProxyKey = `${assetDir}/proxy.pdf`
|
||||
const tmpDir = path.dirname(params.filePath)
|
||||
const pdfFilePath = path.join(tmpDir, 'proxy.pdf')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user