mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 10:55:27 +00:00
feat(asset): replace mediaType/mimeType logic with proxyType
This commit is contained in:
@@ -181,6 +181,7 @@ describe('ChatService', () => {
|
||||
name: 'doc.jpg',
|
||||
type: 'file',
|
||||
mediaType: 'image/jpeg',
|
||||
media: { proxyType: 'image' },
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: childFolder.id,
|
||||
|
||||
@@ -232,7 +232,8 @@ export class ChatService {
|
||||
where: { id: fileId },
|
||||
include: { storageKey: true },
|
||||
})
|
||||
if (file && file.mediaType?.startsWith('image/') && file.storageKey?.key) {
|
||||
const isImage = (file?.media as PrismaJson.MediaInfo | null)?.proxyType === 'image'
|
||||
if (file && isImage && file.storageKey?.key) {
|
||||
resolvedImageUrls.push(file.storageKey.key)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user