Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

add prod

Sara Vieira85b901edd820
diff --git a/packages/asset-uploader/src/helpers/image-fs-path.ts b/packages/asset-uploader/src/helpers/image-fs-path.ts
index ce0e01f5d9..e8f1f2210b 100644
--- a/packages/asset-uploader/src/helpers/image-fs-path.ts
+++ b/packages/asset-uploader/src/helpers/image-fs-path.ts
@@ -4,15 +4,14 @@ import { fsEnvVariables } from "../schema";
const fsUploadVars = fsEnvVariables.parse(process.env);
export const imageFSDirectory = () => {
- const basePath =
- process.env.NODE_ENV === "development"
- ? path.join(
- appRoot.path,
- "apps",
- "designer",
- fsUploadVars.FILE_UPLOAD_PATH
- )
- : "";
+ const isProd = process.env.NODE_ENV === "production";
- return basePath;
+ if (isProd) return path.join(appRoot.path, fsUploadVars.FILE_UPLOAD_PATH);
+
+ return path.join(
+ appRoot.path,
+ "apps",
+ "designer",
+ fsUploadVars.FILE_UPLOAD_PATH
+ );
};