Skip to content

Commit

Permalink
Rename to fs
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Apr 10, 2023
1 parent ac24c1c commit 021b61b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/builder/app/shared/asset-client.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as path from "path";
import { S3Env, FsEnv } from "@webstudio-is/asset-uploader";
import {
createFSClient,
createFsClient,
createS3Client,
} from "@webstudio-is/asset-uploader/server";

export const createAssetClient = () => {
if (process.env.NODE_ENV === "development") {
const env = FsEnv.parse(process.env);
return createFSClient({
return createFsClient({
maxUploadSize: env.MAX_UPLOAD_SIZE,
fileDirectory: path.join(process.cwd(), env.FILE_UPLOAD_PATH),
});
Expand Down
4 changes: 2 additions & 2 deletions packages/asset-uploader/src/clients/fs/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import type { AssetClient } from "../../client";
import { deleteFromFs } from "./delete";
import { uploadToFs } from "./upload";

type FSClientOptions = {
type FsClientOptions = {
fileDirectory: string;
maxUploadSize: number;
};

export const createFSClient = (options: FSClientOptions): AssetClient => {
export const createFsClient = (options: FsClientOptions): AssetClient => {
return {
uploadFile: (request) =>
uploadToFs({
Expand Down

0 comments on commit 021b61b

Please sign in to comment.