0
votes

I have a Logic App where an SFTP connector runs the action "Get Content by Path" and sends the content to a blob storage connector to create the related blob with the "create blob" action. It's a .7z file and it's supposed to be 5,6kb. When it arrives into the storage its size is 10kb and the webjobs that should elaborate it doesn't recognize it as .7z file. If I upload the same file manually through Azure Storage Explorer tool it results to be 5,6kb and the webjob succesfully elaborate it. I also add an Office 365 connector "send email message" action putting the content of the SFTP action as attachement and it arrives as a 10k corrupted file.

With text files I didn't have this problem.

The "body" property of the create blob action is set to the body of the SFTP action "get content by path"

"Create_blob": {
    "inputs": {
        "body": "@body('Ottieni_contenuto_file_in_base_al_percorso')",

Edit with some more info: When I upload the file manually the file ends up with the "x-7z-compressed" content type but when it's uploaded through the Logic App the resulting content type is "octet stream". I tried to set the right content type programmatically in the webjob before elaborating the file but it didn't solve the problem.

1
Check the content type of the blob upload by both options. I think that could be the problemTusharJ
The file uploaded manually has content Type "x-7z-compressed" while the file upload via Logic App has content type octet stream. I also tried to set the content type to "x-7z-compressed" programmatically in the webjob before to elaborate the file blockBlob.Properties.ContentType = "application/x-7z-compressed"; blockBlob.SetProperties(); but the problem persists.Davis Molinari
I updated the questionDavis Molinari
This is a known bug in the ftp connector (the content type header is not set correctly) that will be fixed shortly. Will update here once the fixed is deployed.Szymon Wylezol
@DavisMolinari, can you please verify again? The fix should be deployed globally in all regions by now (as of 2016-10-28). Sorry for the inconvenience.Szymon Wylezol

1 Answers

2
votes

This issue has been identified as a code defect in the Logic Apps SFTP connector (incorrect mapping of file extension to content-type header). A fix is deployed to all global datacenters as of 2016-10-28.