phpSPO
phpSPO copied to clipboard
Sharepoint upload session returns null on getFile if file is smaller than chunksize
If the size of the file uploaded to sharepoint using src/SharePoint/UploadSession.php is below the chunk size, $this->targetFile is not populated, and the getFile method returns null.
(feof is detected and the second loop checking if $fileSize == $bytesRead is never executed)