Skip to content

Commit

Permalink
unsupported input schema for UploadFile
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohec committed Feb 4, 2025
1 parent 67677e4 commit b33b0b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions back/src/domains/core/file-storage/useCases/UploadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ export type UploadFileInput = {
renameFileToId?: boolean;
};

// biome-ignore lint/correctness/noUnusedVariables: <explanation>
const uploadFileInput: z.Schema<UploadFileInput> = z.object({
file: z.object({
name: zStringMinLength1,
encoding: zStringMinLength1,
size: z.number(),
buffer: z.instanceof(Buffer),
buffer: z.instanceof(Buffer), // class not supported by NarrowEvent<Topic>["payload"]
mimetype: zStringMinLength1,
}),
renameFileToId: z.boolean().optional(),
});

export class UploadFile extends UseCase<UploadFileInput, AbsoluteUrl> {
protected inputSchema = uploadFileInput;
protected inputSchema = z.any();

readonly #documentGateway: DocumentGateway;

Expand Down

0 comments on commit b33b0b3

Please sign in to comment.