I have written code to upload the file in SharePoint online .. but while upload the page gets refreshed .. Please help .
Code -
sp.web
.getFolderByServerRelativeUrl("Student%20Details%20No%20Content%20Type")
.files.add(fileContent.name, fileContent, true)
.then(f => {
f.file.getItem().then(item => {
item.update({
Title: "A Title",
Description: "My Other Value"
});
});
});
Now getting error -
Uncaught (in promise) Error: Error making HttpClient request in queryable [400] ::> {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The property 'Description' does not exist on type 'SP.Data.Student_x0020_Details_x0020_No_x0020_Content_x0020_TypeItem'. Make sure to only use property names that are defined by the type."}}} at new HttpRequestErr