Fix: File Upload (#4806)
File upload issue fixed. There was a type mismatch and isDate was returning false
This commit is contained in:
@ -45,6 +45,7 @@ export const useUploadAttachmentFile = () => {
|
||||
fullPath: attachmentUrl,
|
||||
type: getFileType(file.name),
|
||||
[targetableObjectFieldIdName]: targetableObject.id,
|
||||
createdAt: new Date().toISOString(),
|
||||
} as Partial<Attachment>;
|
||||
|
||||
await createOneAttachment(attachmentToCreate);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
export type Attachment = {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
createdAt: string;
|
||||
updatedAt: Date;
|
||||
deletedAt: Date | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user