AI Video Generation Implementation
This commit is contained in:
9
frontend/src/utils/fetchMediaBlobUrl.ts
Normal file
9
frontend/src/utils/fetchMediaBlobUrl.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { aiApiClient } from "../api/client";
|
||||
|
||||
export async function fetchMediaBlobUrl(pathOrUrl: string): Promise<string> {
|
||||
const rel = pathOrUrl.startsWith("/") ? pathOrUrl : `/${pathOrUrl}`;
|
||||
const res = await aiApiClient.get(rel, { responseType: "blob" });
|
||||
return URL.createObjectURL(res.data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user