cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jalonso80
Frequent Visitor

Upload a file to SFTP

Hi,

 

I have troubles uploading a file to SFTP.

 

I get the error 404:

"status": 404,
"message": "A reference was made to a file or folder which does not exist.\r\nclientRequestId: c7af30db-fc0f-4377-a571-36478e29e581",
"source": "sftpconnectionprovider-westeurope.am2-ase-001.p.azurewebsites.net"


I tried to copy, to create and nothing, always the same error. The name of the file is correct, the source path and the destination path.

Any help?

 

Sin título.jpg

Thanks,

9 REPLIES 9
v-xida-msft
Community Support
Community Support

Hi @jalonso80,

 

Do you want to copy a file from your SharePoint library to your SFTP Server folder?

 

The error message told that the file that you specified within Source file path field of the "Copy file" action could not be found within your SFTP server folder.

 

The Source file path field of the "Copy file" action of SFTP Connector is required to fill the path of a file within your SFTP Server, the Destination file path field is required to fill a Path to the destination file within your SFTP Server, including file name.

 

Please check if you have filled proper file path of your SFTP server within the Source file path field of the "Copy file" action. In addition, please check if the file that you specified within the Source file path field of "Copy file" action is existed in your SFTP Server folder. 

 

Also please take a try to re-create your flow and then check if the issue is solved.

 

More details about the Copy file action of SFTP Connector, please check the following article:

Copy file action

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Kris,

 

Thanks for your reply.

 

When you asked me to "check if the file that you specified within the Source file path field of "Copy file" action is existed in your SFTP Server folder", i have to say that the file is created in my SharePoint and then i want to copy or upload it to the specified destination path in the SFTP folder, so it is is a new file that dosen't exists in the SFTP until i upload it.

 

This explains a little bit?

 

Regards,

Javier

 

Hi @jalonso80,

 

If you want to copy a file from your SharePoint library to your SFTP server folder, I think the "Copy file" action could not achieve your needs. If the file has not been existed in your SFTP Server folder, you could not specify it within the Source file path field of the "Copy file" action of SFTP connector.

 

Please take a try to change the "Copy file" action into the "Create file" action. I have made a test on my side and please take a try with the following workaround:

24.JPG

 

Within "Create file" action of SFTP Connector, specify Folder path, File name field set to File name dynamic content of the trigger, File content field set to File Content dynamic content of the trigger.

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Kris,

 

I tried and i get the same result.

 

Sin título.jpg

 

I cannot undertsand it.

 

Regards,

Javier

Hi 

 

Just a note for you. I was also having trouble uploading a file (not creating) for SFTP. Got the same error message as you did.

Instead of using copy file, use update file - that works.

 

/Morten

I get the same error while trying to get the matadata. I'm doing: 'When file is added or modified' -> 'Get file metadata using path'. The path I'm using is the dynamic content from the trigger so I'm completely sure it's correct. Any ideaswhat can cause it?

@olgaoszcz 

Im facing the same issue for WEEKS and I still cannot figure it out. Any change you resolved the issue whening using the trigger 'When file is added or modified'?

any help would be greatly appricated.

thank you

 

- john

@camcotech 

In my case it turned out that the SFTP server (which wasn't 'mine') was deleting every file after it has been downloaded. Apparently when 'When file is added or modified' is triggered, the fie is being downloaded so when the Flow tried to run 'Get file metadata using path' the file wasn't there anymore. Don't know if it helps, it is a very specific scenario.

@olgaoszcz 

This was the exact same scenario in my case as well. 

My client NEVER made this disclosed this information to me, until I spent days of trial and error and video demonstration. They claimed it was for security purposes... Let's just say, there is zero justification for the type of business they were to have a policy such as this.

Thank you for your input.

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (60,658)