MWE

Results 3 comments of MWE

@zoltanbogar Use a try-catch to catch any exceptions. In case you are using a SharePoint List I suggest to use AttachmentCreationInformation instead of FileCreationInformation. For example: ``` $attCreationInformation = new...

@subashdbc To set the content type property you need to set the ID of the desired content type as the value. The property name to set would be "ContentTypeId". `$listItem->setProperty("ContentTypeId",$contentTypeID...

You need to get the FileCollection of your list and add your file with your FileCreationInformation. Something like this: ```` // ADD FILECREATION INFO $fileCreationInformation = new FileCreationInformation(); $fileCreationInformation->Url =...