@stucork is right. You would need the url of the tts_blob object. If you aren’t storing the media file in a data table there is no url.
To get around this you could:
- Generate a unique key for the session (something with enough entropy to not be duplicated within your needed timeframe)
- Send this key to your uplink code
- Return your media file with the key to your Anvil app
- Store the key along with your media file in a data table
- Use the key to find the media object in the data table and get the url
- Continue doing what @stucork suggested
That might seem overly complex, but I’m not sure there is another way to do it. You would think it would be possible to pass the media blob directly to the javascript player in the client…
Also, you should make a background task that periodically removes the media files.