|
|
|
@ -25,6 +25,7 @@ import { isPopiProviderMode } from "@/lib/providerMode"; |
|
|
|
|
|
|
|
const popiserverOutputAssetCache = new Map<string, Promise<string | null | undefined>>(); |
|
|
|
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}`); |
|
|
|
|
|
|
|
|