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.

PR fixes

Sara Vieira486b2740c0ff
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/thumbnail.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/thumbnail.tsx
index c64c7f4f14..e4109c2cce 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/components/thumbnail.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/components/thumbnail.tsx
@@ -75,7 +75,7 @@ export const AssetManagerThumbnail = ({
return (
<Box
- title={alt || ""}
+ title={alt || name}
css={{
aspectRatio: "1/1",
display: "flex",
diff --git a/packages/asset-uploader/src/delete.ts b/packages/asset-uploader/src/delete.ts
index b02c9049ec..b53930a09d 100644
--- a/packages/asset-uploader/src/delete.ts
+++ b/packages/asset-uploader/src/delete.ts
@@ -3,7 +3,7 @@ import { prisma, Asset } from "@webstudio-is/prisma-client";
import { unlink } from "fs/promises";
import path from "path";
import { deleteAssetInDb } from "./db";
-import { imageFSDirectory } from "./helpers/image-fs-path";
+import { imageFsDirectory } from "./helpers/image-fs-path";
import { s3EnvVariables } from "./schema";
import { getS3Client } from "./targets/s3/client";
@@ -14,7 +14,7 @@ export const deleteAsset = async ({
id: string;
name: string;
}): Promise<Asset> => {
- const currentAsset = await prisma?.asset.findUnique({
+ const currentAsset = await prisma.asset.findUnique({
where: { id },
});
if (!currentAsset) throw new Error("Asset does not exist");
@@ -30,7 +30,7 @@ export const deleteAsset = async ({
return await deleteAssetInDb(id);
} else {
- const directory = await imageFSDirectory();
+ const directory = await imageFsDirectory();
await unlink(path.join(directory, name));
return await deleteAssetInDb(id);
diff --git a/packages/asset-uploader/src/helpers/image-fs-path.ts b/packages/asset-uploader/src/helpers/image-fs-path.ts
index e8f1f2210b..6889eb1d61 100644
--- a/packages/asset-uploader/src/helpers/image-fs-path.ts
+++ b/packages/asset-uploader/src/helpers/image-fs-path.ts
@@ -3,7 +3,7 @@ import appRoot from "app-root-path";
import { fsEnvVariables } from "../schema";
const fsUploadVars = fsEnvVariables.parse(process.env);
-export const imageFSDirectory = () => {
+export const imageFsDirectory = () => {
const isProd = process.env.NODE_ENV === "production";
if (isProd) return path.join(appRoot.path, fsUploadVars.FILE_UPLOAD_PATH);
diff --git a/packages/asset-uploader/src/upload.ts b/packages/asset-uploader/src/upload.ts
index c97a34ca26..cd1c26af61 100644
--- a/packages/asset-uploader/src/upload.ts
+++ b/packages/asset-uploader/src/upload.ts
@@ -7,7 +7,7 @@ import { uploadToS3 } from "./targets/s3/uploader";
import { uploadToDisk } from "./targets/disk/upload";
import { assetEnvVariables, s3EnvVariables } from "./schema";
import { Asset } from "@webstudio-is/prisma-client";
-import { imageFSDirectory } from "./helpers/image-fs-path";
+import { imageFsDirectory } from "./helpers/image-fs-path";
const isS3Upload = s3EnvVariables.safeParse(process.env).success;
@@ -23,7 +23,7 @@ export const uploadAssets = async ({
request: Request;
projectId: string;
}): Promise<Asset[]> => {
- const directory = await imageFSDirectory();
+ const directory = await imageFsDirectory();
const formData = await unstable_parseMultipartFormData(
request,
isS3Upload