diff --git a/src/app/api/popi/asset/create/route.ts b/src/app/api/popi/asset/create/route.ts index d267e40c..82faba8e 100644 --- a/src/app/api/popi/asset/create/route.ts +++ b/src/app/api/popi/asset/create/route.ts @@ -5,6 +5,7 @@ import { ApiError } from "@/app/api/_errors"; const POPI_MEDIA_UPLOAD_BASE64_PATH = "/api_client/media/uploadFileBase64"; const POPI_MEDIA_UPLOAD_PATH = "/api_client/media/upload"; const POPI_ASSET_CREATE_PATH = "/api_client/anime/asset/create"; +const POPI_ASSET_ORIGIN_CANVAS = "canvas"; type PopiserverResponse = { status?: string; @@ -145,6 +146,7 @@ async function createPopiserverAsset( description: string ) { const asset = await postPopiJson(request, token, POPI_ASSET_CREATE_PATH, { + origin: POPI_ASSET_ORIGIN_CANVAS, type: type === "video" ? 2 : type === "audio" ? 3 : 1, title, description, diff --git a/src/store/execution/simpleNodeExecutors.ts b/src/store/execution/simpleNodeExecutors.ts index e195ed1e..9806742b 100644 --- a/src/store/execution/simpleNodeExecutors.ts +++ b/src/store/execution/simpleNodeExecutors.ts @@ -25,6 +25,7 @@ import { isPopiProviderMode } from "@/lib/providerMode"; const popiserverOutputAssetCache = new Map>(); const USER_SESSION_STORAGE_KEY = "node-banana-user-session"; +const POPISERVER_CANVAS_ORIGIN = "canvas"; function isPopiserverMediaUrl(value: string): boolean { if (value.startsWith("/media/") || value.startsWith("/media_private/")) return true; @@ -129,6 +130,7 @@ async function createPopiserverAssetForOutput( const extension = extensionForMimeType(mimeType, kind); const formData = new FormData(); formData.append("type", kind); + formData.append("origin", POPISERVER_CANVAS_ORIGIN); formData.append("title", title || ""); formData.append("file", blob, `canvas-output-${Date.now()}.${extension}`);