mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
Merge pull request #755 from bigcapitalhq/fix-upload-attachments
hotbug: upload attachments
This commit is contained in:
@@ -74,11 +74,11 @@ export function UploadAttachmentsPopoverContent({
|
|||||||
};
|
};
|
||||||
// Uploads the attachments.
|
// Uploads the attachments.
|
||||||
const { mutateAsync: uploadAttachments } = useUploadAttachments({
|
const { mutateAsync: uploadAttachments } = useUploadAttachments({
|
||||||
onSuccess: (data) => {
|
onSuccess: (data, formData) => {
|
||||||
const newLocalFiles = stopLoadingAttachment(
|
const newLocalFiles = stopLoadingAttachment(
|
||||||
localFiles,
|
localFiles,
|
||||||
data.config.data.get('internalKey'),
|
formData.get('internalKey'),
|
||||||
data.data.data.key,
|
data.key,
|
||||||
);
|
);
|
||||||
handleFilesChange(newLocalFiles);
|
handleFilesChange(newLocalFiles);
|
||||||
onUploadedChange && onUploadedChange(newLocalFiles);
|
onUploadedChange && onUploadedChange(newLocalFiles);
|
||||||
|
|||||||
Reference in New Issue
Block a user