I have noticed a bug when using the PnP library for SPFX to upload multiple attachments.
Using: email@example.com targeting: SharePoint Online
Expected Behavior Question
When uploaded multiple attachments of any size the promise setup up in item.attachmentFiles.addMultiple(attachments) will chain the requests and upload them correctly
When using the item.attachmentFiles.addMultiple(attachments), it is intermittently causing a 409 error due to conflicts in the upload, my research has led me to believe this is caused by one file not being fully uploaded before moving onto the next, in the test case that most commonly causes this the files are approximately 3Mb in size. The error is more likely to occur the more files that are being uploaded. All files uploaded have different names and content.
Steps to Reproduce
Files are stored in an array in the state and pulled out and converted into an array of attachments before being uploaded with item.attachmentFiles.addMultiple(attachments) code bellow:
I am currently working to resolve this issue, any assistance or information from people who have encountered this issue before will be appreciated.
Thank you for your feedback!