Logic app: Copy file to another folder on same FTP folder not working. (Empty / damaged file)

Wouter 1 Reputation point
2022-02-22T13:58:43.683+00:00

I created a logic app that moves a file from one folder on my FTP server to another folder on the same FTP server. I made a loop that goes over every image in a folder and then copies it to another folder. For some reason the images copied are "white" and don't show the image.

The image
176882-image.png

What am I doing wrong?
Loop over every image in the folder:
176838-image.png

Copy the image to another folder:
176854-image.png

I uploaded the full code to my logic app here.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,546 Reputation points Moderator
    2022-02-24T10:38:41.463+00:00

    Hi @Wouter ,

    Welcome to Microsoft Q&A! Thanks for posting the question.

    I understand that you are trying to use actions from FTP connector to move files from one folder to another on a FTP server. I used the same Logic App as shared along with this question, except for the first trigger - I changed it to "When a HTTP request is received" trigger so that I can test it right now. It worked as expected and I see the image files properly getting copied without any distortion.

    I used an Azure VM as FTP server and followed the steps here to configure it. Is it possible that the source image itself was not properly copied/generated? A quick test would be to remove the "Delete file" action from the Logic Apps and see if source and copied image are different. You could also use "When a HTTP request is received" trigger to test. When you test the Logic Apps from Portal using the 177487-image.png button, you can also see the input and out of each action by clicking on them. That should help you figure out the details (source/target file name etc.)

    Please let me know if you have any questions.

    ---
    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.