link to internal document in Resouces folder...

Is it possible, and if so, how would one link to a document or file that you dragged into a web application? I found the files in the Resources folder once I built; however, not sure what URL I should use to link them by (if at all possible)…

Best I can find is this: http://documentation.xojo.com/index.php/WebFile

First of all, if you want to be able to link to them, use a CopyFilesStep instead of dragging them into the project. You’re creating objects in your project that you can’t use.

Second, you can follow Bob’s suggestion and use a WebFile OR if you’re deploying as CGI, you can get Apache (or whatever web server you’re using) to serve the files directly using something like this:

If your app’s url is this:

http://myserver.com/myApplication.cgi

You could reference a file like this:

http://myserver.com/Resources/image.png

Another way to access these files is to use the App.HandleURL event. This method is available in both CGI and Standalone apps and you can refer to any file on disk that you can read using a URL path that you define. For instance you could do something like this:

CGI:        http://myserver.com/myApplication.cgi/images/image.png
Standalone: http://myserver.com:8080/images/image.png

and then in HandleURL look at the incoming path and if it begins with /images you know that it’s looking for an image in the Resources directory. Just be careful that you only return True if you want to intercept the request. If Request.Path is empty and you return True, your app will not start.

Appreciate it, Greg…