Skip to content

Commit

Permalink
Merge pull request #755 from bigcapitalhq/fix-upload-attachments
Browse files Browse the repository at this point in the history
hotbug: upload attachments
  • Loading branch information
abouolia authored Nov 16, 2024
2 parents 5d6f901 + 0e99ac8 commit d115ebd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface AttachmentFileCommon {
size: number;
mimeType: string;
}
interface AttachmentFileLoaded extends AttachmentFileCommon {}
interface AttachmentFileLoaded extends AttachmentFileCommon { }
interface AttachmentFileLoading extends AttachmentFileCommon {
loading: boolean;
}
Expand Down Expand Up @@ -74,11 +74,11 @@ export function UploadAttachmentsPopoverContent({
};
// Uploads the attachments.
const { mutateAsync: uploadAttachments } = useUploadAttachments({
onSuccess: (data) => {
onSuccess: (data, formData) => {
const newLocalFiles = stopLoadingAttachment(
localFiles,
data.config.data.get('internalKey'),
data.data.data.key,
formData.get('internalKey'),
data.key,
);
handleFilesChange(newLocalFiles);
onUploadedChange && onUploadedChange(newLocalFiles);
Expand Down

0 comments on commit d115ebd

Please sign in to comment.