How to read file content from sftp in azure function

Copper Contributor

I am trying to download file content from sftp and it works in windows10 local system but on azure portal not working.
File.OpenWrite throws error as Could not find file.

using (Stream tempFile = File.OpenWrite(tempFolder + fileName))
{
sftp.DownloadFile(fileFullName, tempFile);
}

Please suggest.

2 Replies
Can you comfirm that the sftp path tempFolder + fileName is reachable from your azure resource?

@subhankars 

Yes, I am able to reach the sftp folder.

Problem with the compressed(.zip) file.

I want read the content from compressed file in azure function.