Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading attachments are not working #728

Open
StefanHolst opened this issue Oct 27, 2024 · 1 comment
Open

Uploading attachments are not working #728

StefanHolst opened this issue Oct 27, 2024 · 1 comment

Comments

@StefanHolst
Copy link

Affected Versions

26088a7 and v0.20.6

Description of Bug

Uploading attachments to bills or expences fails when checking if the file was succesfully uploaded.

image

image

It looks like the commit 37fd4a1 to support feat: Uploading company logo broke support for uploading other attachments: useUploadAttachments and useMutation

https://github.com/bigcapitalhq/bigcapital/blob/v0.20.6/packages/webapp/src/containers/Attachments/UploadAttachmentsPopoverContent.tsx#L76

Stacktrace

UploadAttachmentsPopoverContent.tsx:111 TypeError: Cannot read properties of undefined (reading 'data')
    at Object.onSuccess (UploadAttachmentsPopoverContent.tsx:80:21)
    at mutation.js:92:71
(anonymous) @ mutation.js:106
Promise.catch
t.execute @ mutation.js:102
n.mutate @ mutationObserver.js:83
onChange @ UploadAttachmentsPopoverContent.tsx:111
onDrop @ ImportDropzoneFile.tsx:46
(anonymous) @ index.mjs:470
(anonymous) @ index.mjs:513
Promise.then
(anonymous) @ index.mjs:512
onClick @ ImportDropzoneFile.tsx:77
ke @ react-dom.production.min.js:54
je @ react-dom.production.min.js:54
(anonymous) @ react-dom.production.min.js:55
Dr @ react-dom.production.min.js:105
Hr @ react-dom.production.min.js:106
(anonymous) @ react-dom.production.min.js:117
cc @ react-dom.production.min.js:273
ze @ react-dom.production.min.js:52
Gr @ react-dom.production.min.js:109
$t @ react-dom.production.min.js:74
Wt @ react-dom.production.min.js:73
Show 17 more frames
Show lessUnderstand this errorAI
UploadAttachmentsPopoverContent.tsx:80 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'data')
    at Object.onSuccess (UploadAttachmentsPopoverContent.tsx:80:21)
    at mutation.js:92:71
Copy link

linear bot commented Oct 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant