使用以下内容作为附件提交到SharePoint列表项时,出现此错误。
const { filePicked } = this.state;
if (filePicked) {
let targetList: IList = sp.web.lists.getByTitle('PanelMeetings');
let selectedFile = filePicked.downloadFileContent();
let reader = new FileReader();
reader.readAsArrayBuffer(selectedFile);
reader.onload = () => {
targetList.items.getById(r.data.Id).attachmentFiles.add(filePicked.fileName, reader.result);
this.setState({
message: 'Attachment Successfully added'
});
};
}
我已阅读:https://en.it1352.com/article/fe83588ba22a46fa8c16676cc29ec66a.html 但这并没有全面详细地说明确切的问题。 有人可以告诉我我在做什么错吗?