Azure Function - Downloading a Box File - The system cannot find the file specified
Hi,
I am building an Azure function (using the Box Java API) that will be called by a webhook on a Box folder when a file is uploaded to that folder. The azure function then needs to download the file, for which I'm using the code below:
Although this works fine when testing locally, when it is deployed as an Azure function i get the following error intermittently:
(The system cannot find the file specified)
Has anyone else encountered anything similar?
Regards - Phil
-
Just a quick update on the above. I think this has been resolved by getting the temporary folder location appended to the file name in the FileOutputStrem.
So the code now looks like:
FileOutputStream stream = new FileOutputStream(System.getProperty("java.io.tmpdir")+info.getName());
Please sign in to leave a comment.
Comments
1 comment