Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

jordi

Profi

  • »jordi« ist der Autor dieses Themas

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

1

Dienstag, 13. Februar 2018, 10:11

file existance checker

Hi,

I made a very simple plugin yet quite powerful, that allows you to check if a file (jpg, xml, ...) exist or not, so you can use it to avoid having the krpano error when file is not found, or many other things ...

USAGE :

first you need to include it of course

Quellcode

1
<include url="file_exist.xml" />



inside the action you want just call the action checkFileExist and pass as parameter the url of the file you want to check

Quellcode

1
checkFileExist(path/to/your/file/name.png);

take in care the path must be set from the root of your project

then you will have a variable that stores if the file exist or not


Quellcode

1
debug('does my file exists : ', urlExist);



That's all as simple as that.

Hope you enjoy this little contribution.
»jordi« hat folgende Datei angehängt:
  • file_exist.xml (668 Byte - 313 mal heruntergeladen - zuletzt: Heute, 05:28)
everpano.com step beyond 360

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Dienstag, 13. Februar 2018, 10:26

Wow) That's pretty cool! Thanks) I'll give it a try ;-)
Regards,

Alexey