feat: add Docker support with Dockerfile and docker-compose.yml, update asset upload to use backend URL
This commit is contained in:
@@ -77,9 +77,9 @@ const uploadDesignAsset = async (
|
||||
throw new Error("Asset uploads can only run in the browser context.");
|
||||
}
|
||||
|
||||
const storageUrl = config.public.storageUrl;
|
||||
if (!storageUrl) {
|
||||
throw new Error("Storage URL is not configured.");
|
||||
const backendUrl = config.public.backendUrl;
|
||||
if (!backendUrl) {
|
||||
throw new Error("Backend URL is not configured.");
|
||||
}
|
||||
|
||||
const formData = new FormData();
|
||||
@@ -92,7 +92,7 @@ const uploadDesignAsset = async (
|
||||
}
|
||||
|
||||
return await $fetch<StorageUploadResponse>("/storage/upload", {
|
||||
baseURL: storageUrl,
|
||||
baseURL: backendUrl,
|
||||
method: "POST",
|
||||
headers: {
|
||||
"content-type": "multipart/form-data",
|
||||
|
||||
Reference in New Issue
Block a user