SharePoint Integration

I want to upload a document to sharepoint. It is connected system and works fine. But when used it in Interface it is showing error.

a!localVariables(

{
a!sectionLayout(
label: "Section",
contents: {
a!fileUploadField(
label: "File Upload",
labelPosition: "ABOVE",
target:cons!AT_DSE_DOCUMENTS,
value:ri!document,
saveInto:a!save(ri!document,save!value),
validations: {}
)
}
),
a!buttonArrayLayout(
buttons: {
a!buttonWidget(
label: "Button",
style: "NORMAL",
submit:true,
saveInto:rule!UploadDocumentToAppian(
document: ri!document,
documentName: "Test.pdf")
)
},
align: "START"
)
})

  Discussion posts and replies are publicly visible