Open smalers opened 4 years ago
The following Markdown syntax will not directly download a file when clicked, but will show the file in another tab with the complete file path as the URL. It also gives the user an option to right click on the link and choose Save link as... where the save as window will open and give them an option to name the file whatever they like.
[Download with Markdown link](assets/app/data-maps/map-layers/active-ditches.geojson)
The HTML below will let a user directly download the file when left clicked, and right click offers the same options from above.
an optional attribute value is filename
where something like filename="filename.txt"
would specify the name of the downloaded file.
<a href="assets/app/data-maps/map-layers/active-ditches.geojson" download>Download with HTML link</a>
Some file extensions are downloaded automatically when given as a URL to a browser, and some are displayed. There is a good Medium article about it here:
It looks like there are a couple headers that can be set/changed to force a browser to download or display, depending on what we want it to do. I don't think this is extremely necessary right now, but it might be good to know in the future.
It would be useful to know how to create markdown/html links to the assets. For example, a simple way to let people download data files would be to manually create a table listing files or create with a script or command file. Need guidance on how to do this so that I can evaluate whether to explain this as an option for save/download of data files. Technical issues include:
WebGet
command to download the asset file.I'm not sure what variation makes sense. I'm just trying to figure out.