Retrieving files from web server

I am trying to retrieve a text file and/or picture from my web server.
I have configured the DocumentRoot as /var/www//public_html.
In that DocumentRoot I have saved all the php scripts which I am calling, and that works fine when I am referring to them in my AI2 code, e.g. http://:8080/update.php.

However, if I save a text file or picture file into the same directory, the AI2 code does not find the files if I am trying to download them by referring with http://:8080/TS2019.jpg or http://:8080/tommi.txt.

How should I refer to the files in http declaration in case get them downloaded??

Corrections:
DocumentRoot directory = /var/www/(site_name)/public_html
PHP scripts are being referred in AI2 code with http://(site_name):8080/update.php.
Files’ download are being referred with http://(site_name):8080/TS2019.jpg or http://(site_name):8080/tommi.txt

  1. While testing, remove the progress dialog blocks and the timeout blocks
  2. Pretty certain you CANNOT read a file directly from a url, it needs to be on the device
  3. For images, you can set an image component to a url, no need to download
  4. For files you want to download to the device, you need to set the save file response and filename before calling the web get, and use when web got file. You can only do one file at a time.

It worked!

Thanks a lotlot!

  • TommiS

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.