We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b07aa00 + c66bbc7 commit 959c3f5Copy full SHA for 959c3f5
src/controls/listItemAttachments/ListItemAttachments.tsx
@@ -76,12 +76,14 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
76
77
public async uploadAttachments(itemId: number): Promise<void> {
78
if (this.state.filesToUpload) {
79
- await Promise.all(this.state.filesToUpload.map(file => this._spservice.addAttachment(
80
- this.props.listId,
81
- itemId,
82
- file.name,
83
- file,
84
- this.props.webUrl)));
+ for (const file of this.state.filesToUpload) {
+ await this._spservice.addAttachment(
+ this.props.listId,
+ itemId,
+ file.name,
+ file,
85
+ this.props.webUrl);
86
+ }
87
}
88
return new Promise<void>((resolve, reject) => {
89
this.setState({
0 commit comments