Kestralcontrols Posted August 20, 2018 Report Share Posted August 20, 2018 Hi, I'm trying to create a Web Server link to download a file stored on the SD card. I have tried copying the example shown in the help-file section "WE: Hyperlinks" but it returns an error "invalid URL address". How do you covert the SD card path into a valid URL so that it will link the anchor text to the SD card file. Kind Regards, Sam Quote Link to comment Share on other sites More sharing options...
NoamM Posted August 20, 2018 Report Share Posted August 20, 2018 Hi Kestralcontrols, In order to download a file that stored on the SD card via a web server "Hyper Link" use the prefix "ExternalSd" before the path to the file. For example, lets assume the next file exist on my SD card "/MyDir/MyFile.txt". and that I have a "Hyper Link" widget that it "Tag:Link" is tag PATH_TO_FILE. If I will set PATH_TO_FILE to "/ExternalSd/MyDir/MyFile.txt" and press on the "Hyper Link" on the web site the file will be downloaded: Quote Link to comment Share on other sites More sharing options...
Kestralcontrols Posted August 20, 2018 Author Report Share Posted August 20, 2018 Hi NoamM, Thanks for the quick reply. I was using this method, but it kept failing. The problem was that the SD file structure on the card is not the same as it is shown on the HMI file browser. I was trying to download a file that was located within the Data Tables directory. I assumed that the directory was named "Data Tables" because that was what the file browser named the directory, but when I removed the SD card and read it, the real directory for storing Data Tables is named "DT" When I changed the path to /ExternalSd/DT/08-18.scv instead of /ExternalSd/Data Tables/08-18.csv it worked. Thanks again, Sam Quote Link to comment Share on other sites More sharing options...
Skof Posted February 16 Report Share Posted February 16 I was having the same problem, until I read this topic. Thanks for posting it, it is very useful. In my app I am using different tables storing each month, and was trying to make the user to choose whichever month wants to download. So bottom line is, you have to remove the SD card, put it in your PC and check the directories. BR 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.