GroveStreams
micl78 private msg quote post Address this user
Hi,
I recently wanted to upload my JSON software configuration from my remote device each time the device re-boots (infrequently) so I know the configuration it is using. I found the string has a 256 length limit. I need around 1000 characters. Is there a way to set the string length limit?
I then looked at uploading files, this could work for me so I created a stream with datatype of File. I tried to show the file in a dashboard. My next question would be how to get the latest file in a file type stream to show up in a URL widget. Or, how can I show a long string in a dashboard? I would need to get a link to the latest stream point of a file or string stream and use HTML or URL somehow I think.
Thank you!
Michael
Post 1 IP   flag post
MikeMills private msg quote post Address this user
This worked for me:

1. Created a file with json in it. I named mine: settings.json
2. Created a File Stream:
* Component ID=comp1
* Stream ID=settingsFile
3. Dragged settings.json onto the file stream

4. Test: Paste file stream url into a browser to test it was bringing back the lastest file and displayed the contents:
https://www.grovestreams.com//api/comp/comp1/stream/settingsFile/feed/file/settings.json?org=00000000-0000-0000-0000-000000000001

5. Created an HTTP widget:
* Click widget settings
* Under HTML, select Source Edit in the toolbar
* Paste This:
<div style="">
   <object width="100%" height="100%" data="https://www.grovestreams.com//api/comp/comp1/stream/settingsFile/feed/file/settings.json?org=00000000-0000-0000-0000-000000000001">
   <embed width="100%" height="100%" src="https://www.grovestreams.com//api/comp/comp1/stream/settingsFile/feed/file/settings.json?org=00000000-0000-0000-0000-000000000001"/>
   </object>
</div>


This might only work if the file name has the right extension like ".json"
Post 2 IP   flag post
micl78 private msg quote post Address this user
thank you, i can confirm this works for .json and .txt, but not .ini. I can work with this, thank you!
Post 3 IP   flag post
3015 3 3
Log in or sign up to compose a reply.