I know how to save a text file to the hub but how about a picture?
This is an example of my code:
theGraph = "<img width=\"100%\" src=\"https://quickchart.io/chart?c={type:'line',data:{labels:[1,2,3,4],datasets:[{label:'Test',data:[50,60,80,90]}]},options: {title: {display: true,text: 'Test Chart'}}}\">"
Pop this into your browser to see the output that needs to be saved:
https://quickchart.io/chart?c={type:'line',data:{labels:[1,2,3,4],datasets:[{label:'Test',data:[50,60,80,90]}]},options: {title: {display: true,text: 'Test Chart'}}}
I have a working app to display all kinds of charts but just need to be able to save the picture to use on a dashboard.
Thanks for any help!
I'd also like this, the best I came up with was to store links to online images for weather radar shots, would prefer to store them locally
Tagging @thebearmay, can't remember if I asked you about this previously...
Right now not a good way of storing blob data to the file system from an app. Like @sburke781 I've been storing links, or JSON containing links instead.
Going to plan B then. Store the chart in a device attribute.
Thanks
Not that I've poked further at it, but the Hub Local File Manager has a web interface; I'd think that you should be able to download the file, then post it back up to that. Looks like HPM supports populating files from a package, too, so if it's static you could use that.