Is Push/Stream through the browser available?

When I use ruby, I’m able to use a “send_data” call which pushes/streams a file to the browser and forces the browser to render the file as an attachment. It’s independent of the url where the file is located, and the user actually never sees a url.

I’m trying to make this happen in Bubble and can’t seem to do so. I know how to make a file URL available for download, but I’m actually trying to generate a unique link that would have the following functionality:

  1. be formatted as “http://myurl/file_id” (I can do this)
  2. upon receiving the link, bubble would check and see if a file with that id exists (I can do this)
  3. if that file exists, push/stream that file through the browser as an attachment for download. (This step has plagued me for some time.)

I know how to present the file_url for download and I know how to use the privacy settings, but it’s the browser push I’m looking for if it is at all avaialble in Bubble right now.


1 Like

FWIW, I have the same issue. Described here under the announcement of the new API “File” features.

@marca suggested that I email support with a description of what I’m trying to do. Literally, we just need a way to serve file from Bubble.

BTW, if you’re ONLY concerned about doing this in the browser (i.e., you do not have other APPS expecting a file being served), and you’re NOT concerned about the redirect, just do this:

Create a workflow “When Page is Loaded”, Navigation > Open an external website

The destination website should just be the direct URI to file in question.

If the file is browser-openable, it will open in the browser. If its MIME type is such that the browser will download it, it will download it.

However it is that Bubble accomplishes this, it seems to be equivalent to setting a HEADER item like

I know YOU’RE not trying to do this, Saeed, but I figured someone else might find that previous tip helpful.

As for myself, I need to serve up a file based on directly from Bubble (issue being that I’m using the API File feature to generate some .ics files that get updated regularly – and since you can’t store the file with the same URL [it’ll always be different], I can’t just use the s3 URL as the location of “the file” is always different when its been updated – and external Calendar apps are not happy with any of the redirect techniques currently available to us in Bubble.)

Anyway, @marca suggested emailing support about this isse.


1 Like