You are not logged in.

1

Saturday, August 8th 2015, 1:03pm

Check if a certain file exists.

I create some krpano actions. Could anybody tell me how to check if the file of specified name exists in file system. Perheaps one has to implement such a statement:

if img/abc.jpg exists

Source code

1
set(layer[besticon].url, 'img/abc.jpg');
otherwise

Source code

1
set(layer[besticon].url, 'img/abc.gif');


Thank you

2

Wednesday, August 12th 2015, 7:53am

Hi,

there is no 'filesystem' on the web - checking if a file exists would mean trying to 'download' a file and seeing if the downloading was successful or not.

Currently there is no xml api for manually downloading files (but there is one planed).

Best regards,
Klaus