Fix: File Upload (#4806)

File upload issue fixed.
There was a type mismatch and isDate was returning false
This commit is contained in:
Kanav Arora
2024-04-04 19:03:17 +05:30
committed by GitHub
parent 04c06e3f91
commit f8ec40dbfb
2 changed files with 2 additions and 1 deletions

View File

@ -45,6 +45,7 @@ export const useUploadAttachmentFile = () => {
fullPath: attachmentUrl, fullPath: attachmentUrl,
type: getFileType(file.name), type: getFileType(file.name),
[targetableObjectFieldIdName]: targetableObject.id, [targetableObjectFieldIdName]: targetableObject.id,
createdAt: new Date().toISOString(),
} as Partial<Attachment>; } as Partial<Attachment>;
await createOneAttachment(attachmentToCreate); await createOneAttachment(attachmentToCreate);

View File

@ -1,6 +1,6 @@
export type Attachment = { export type Attachment = {
id: string; id: string;
createdAt: Date; createdAt: string;
updatedAt: Date; updatedAt: Date;
deletedAt: Date | null; deletedAt: Date | null;
}; };