This article is contributed. See the original author and article here.

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.rnclientRequestId: 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 Componse 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’)”,



Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.