Serve a .txt file at a static https: URL

We're hoping to leverage our FlowFuse instance as middleware between certain UIs and an ecommerce/payment gateway.

One of the providers needs us to "Verify" all of the domains that will be called out to in a transaction.

What would be the easiest way to serve a static .txt file @:

https://[our-account].flowfuse.cloud/.hidden-dir/my-domain-verification-key-file.txt

Is the .txt file store natively in our FlowFuse resources? Or does it need to be stored elsewhere and called into a Flow to serve up every time an http request comes in looking for it?

I've tried adding the .txt file to our Assets for the Instance, but I'm being prompted to upgrade our team, even though Persistent Files is shown as a feature in the Starter level services. Are we just not able to use the FlowFuse Asset Manager UI, but we can use a flow module to get the .txt file into the flow storage resource(s)?

I have sent you a private message - lets see if we can get this resolved for you.

Starter teams get file storage, they just don't get the extra tools to work with those files via the Forge Web app ("Assets").

You can still interact with files persistently using Node-RED, If you want to expose the file for HTTP access you will need to add it to your flow using the http-in/http-response pattern and a file-read node.

The file should be wrtten to a location under /data/storage but it doesn't need to match the path it is served on, you can just set the correct path in the http-in node.

To be honest you don't even need to use a file, the content of the text file can just be set to msg.payload in a change node between the http-in and http-response as long as the right route is in the http-in node

Thank you for the pointers, @hardillb and @Steve-Mcl

We successfully verified the URL by simply returning the txt contents and proper headers for the http request. We'll keep in mind we'd need to create our own UI/Dashboard interface if we're still on Starter tier and need non-technical users to manage files like Assets features allow.

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.