The provided file size 'xxxxxxxxx' for the create or update operation exceeded the maximum allowed

Published Dec 15 2020 08:07 PM 11.6K Views
Microsoft

Scenario:
Within Logic App constructing a string variable - sendtosftp
Using this data creating a new file on the SFTP server.
If the constructed variable size exceeds 50 MB size limit, get an error similar to:

{
  "status": 400,
  "message": "The provided file size '58100000' for the create or update operation exceeded the maximum allowed file size '52428800' using non-chunked transfer mode. Please enable chunked transfer mode to create or update large files.\r\nclientRequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "error": {
    "message": "The provided file size '58100000' for the create or update operation exceeded the maximum allowed file size '52428800' using non-chunked transfer mode. Please enable chunked transfer mode to create or update large files."
  },
  "source": "sftpwithssh-eus.azconn-eus.p.azurewebsites.net"
}
This issue happens even though "Allow Chunking" property is set to "On".
 

Resolution:
Before sending the data to SFTP, create a Compose action and set its value to the previous string variable.
Add the "body" to the Compose action.

e.g.

 "Compose": {
                "inputs": {
                    "body": "@variables('sendtosftp')"
                },
                "runAfter": {
                    "Until": [
                        "Succeeded"
                    ]
                },
                "type": "Compose"
            },
            "Create_file": {
                "inputs": {
                    "body": "@body('Compose')",
4 Comments
Version history
Last update:
‎Dec 16 2020 12:17 AM
Updated by: