rejetto forum

HFS File Server Version 2.3, #284 beta

0 Members and 1 Guest are viewing this topic.

Offline 1001questions

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
There must be someone out there that knows how network events work in version 2.3 beta #284? It would be most appreciated if somebody could direct me on how to: execute the "script command line" in HFS.EVENTS, when the incoming "requested GET" to "myserver" is not a browsing request, but is a "requested GET" only seeking to linkup to a image file on "myserver"? --i.e. (example) <img src=""> (this being the incoming request to my server!) The network event: [request] before the "script command line" in HFS.EVENTS  does not work! MY script command line DOES NOT get executed! It DOES get executed with a regular browsing request, though, so there is not a problem with my "script command line" --Somebody please help me on this. It would be most appreciated. thanks


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
[request] is supposed to be executed for both pages and files.

to tell when it's looking for an image, you can just check if the address ends with a jpg/gif/png

address is %url%
to check it we have {.match.}

{.if| {.match| *.jpg;*.gif;*.png | %url% .}
| hello, you are searching for an image
| anything else

i didn't test it