Jump to content

Download a file using a "Hyper-link" in UniStream web server

Recommended Posts

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,

Link to comment
Share on other sites

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:


Link to comment
Share on other sites

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,


Link to comment
Share on other sites

  • 4 years later...

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. 


  • Upvote 1
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...