Resolve file chunking error of Share Point 'Create File' action in Power Automate
In this #PowerShot, I will show you how to resolve the "The response to partial content upload request was not valid. The returned range header value 'bytes=0-xxxxx' is not in the expected range of '0-3524' with unit set to 'bytes'" error of the SharePoint create file action in Power Automate. This error generally pops up when you are trying to upload a file to SharePoint using the Create File action and the file size is slightly bigger than what is allowed in a single request.
In the flow, I have an action to get a file from the file system on the local machine and upload it to SharePoint document library. The below screenshot shows the setup of the actions for this.
Once run, below is the error snippet due to a larger file size than allowed as a chunk to be processed in the create file action.
Although, you will notice that the file gets created in the SharePoint Document library, the flow errors out. This file created in the library might be a corrupt one as well. The fix to this is open the settings on the create file action and disable "Allow Chunking" from the Content Transfer Policy as shown in the image below.
Once the above changes are made, the flow is saved and re-submitted. Below is the successful run screenshot for the same.
I hope you found this interesting and it helped you. Thank you for reading!