Add api prefix to attachment nodes

This commit is contained in:
Philipinho
2025-03-06 14:19:29 +00:00
parent a7dd9b9198
commit 16254802e3
6 changed files with 15 additions and 6 deletions

View File

@ -95,7 +95,7 @@ export const handleAttachmentUpload =
if (!attachment) return;
const node = schema.nodes.attachment?.create({
url: `/files/${attachment.id}/${attachment.fileName}`,
url: `/api/files/${attachment.id}/${attachment.fileName}`,
name: attachment.fileName,
mime: attachment.mimeType,
size: attachment.fileSize,

View File

@ -102,7 +102,7 @@ export const handleImageUpload =
if (!attachment) return;
const node = schema.nodes.image?.create({
src: `/files/${attachment.id}/${attachment.fileName}`,
src: `/api/files/${attachment.id}/${attachment.fileName}`,
attachmentId: attachment.id,
title: attachment.fileName,
size: attachment.fileSize,

View File

@ -102,7 +102,7 @@ export const handleVideoUpload =
if (!attachment) return;
const node = schema.nodes.video?.create({
src: `/files/${attachment.id}/${attachment.fileName}`,
src: `/api/files/${attachment.id}/${attachment.fileName}`,
attachmentId: attachment.id,
title: attachment.fileName,
size: attachment.fileSize,