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,
|
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);
|
||||||
|
|||||||
@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user