2
votes

I have a required to download a file from SFTP server and the file downloaded is stored to local folder say "D:\Data\tempData.csv" I have to read the data from local file and consume in my application for other data manipulation.

This job is created using web hooks scheduler in Azure Web Jobs.

I am unable to download file to azure and then read from there.

Can some one help me to use a location for temp data which is equivalent to "D:\Data\tempData.csv" in local system in the azure environment.

Suggest a place in azure where can I download file and then to read from there.

Thanks in Advance.

What I tried? Tried using SSH.NET dll to download file from SFTP to local folder Again to read from local folder to my application Tried looking at BLOB storage usage, which was not approved Tech Arch.

2

2 Answers

4
votes

In an Azure Web App, you can create files anywhere under d:\home (for persistent files) or under d:\local (temporary files). See this page for more details on the file system. Try using Kudu Console to see those locations.

How you get the file in that location sounds mostly unrelated to your primary question about what location you can use.

0
votes

In Azure Environment, the "Web-Jobs" are stored in its local folder where known as "D:\home" and "D:\local" is the local folder used by the Web-hooks. I was in need to use a folder for temporary usage of downloading a file from SFTP server and again read the file from that local temporary location file and consume it in my application.

I have used the "D:\local\Temp" as the temporary folder which is created by the code after checking the folder existence, then after creating the folder the code will download a file from server and store to this location and then read from the same location and delete the file from that temporary folder.

Thanks all for your help, @David Ebbo Thanks.