@Lars_Andersson here’s what I have so far. Some version of this will eventually become a library template, but I don’t quite have it to a point yet where I could upload it to the catalog. I wanted to put this in your hands and see if it works for your use case.
Import this into your application; it will create an experience endpoint and a workflow backing it, as well as an edge workflow to edit and deploy to your device. You’ll need to be running edge agent version 1.23.0 or higher to use the Agent Config: Get Node. You’ll need to put some nodes at the start of the flow to get a file directory and file name in place.
The edge workflow will make an HTTP request to the experience endpoint, sending along the device credentials (ID, key, and secret, which are used to authenticate the request) and the meta information about the file (retrieved using the first two Run Executable Nodes). The experience workflow will reply to the request with the data needed to upload the file to the storage service directly from the device, which is handled in a curl request in the final Run Executable Node.
Let me know if you have any questions. When I port this to the template library, I may trade out the HTTP request authentication with publishing to a custom MQTT topic, but am currently weighing the pros and cons of that approach.