23
votes

Is there an Azure WebJobs preferred mechanism to obtain a local storage folder/path for processing my blob's data (a sqlite db)? I can get the stream, but need to write it to disk so that Sqlite can open a connection to it.

I know RoleEnvironment.GetLocalResource is meant to be used with WebRoles... is there an equivalent for WebJobs?

2

2 Answers

28
votes

You can use your temporary directory, you can find it as an environment variable called TEMP, usually it'll be under C:\DWASFiles\Sites{sitename}\Temp.

One thing to note is that the maximum size allowed there is 500MB for free/shared sites (see documentation), for standard it's much higher (~200GB which is shared between sites in that instance).

Also maybe trivial but the temporary directory is temporary (will probably be removed when the site is recycled) and one instance cannot see another's temporary directory.

0
votes

for the sizing, the Free tier and Shared tier get 1GB of space, Basic sites get 10GB, and Standard sites get 50GB