[New Feature] File option on API Connector plugin

OK, so I’ve successfully used this new feature to create an API that builds iCalendar files (.ics files, type text/calendar) and returns them to Bubble where they are automagically stored.

This is great, but I’ve run into a problem. What I need to DO with them is serve them up (the file ITSELF, rather than a page) when an external system (or user) hits a certain URL.

I know what you’re going to say: "Well, just tell the external system or user than the URL to hit is the URL of the file as saved in s3.)

That solution would work fine, except that these files change frequently. And there seems to be no capability to save a NEW version of the file to the SAME URL in s3 as the previous version of the file. So I can’t seem to have a persistent, reliable URL / URI that points to a file saved in this way.

I’ve tried various workarounds such as:

  1. Creating a page with a HTML header a http-equiv refresh directive. While this works great for human with a browser, external systems expecting a file do not like it.

  2. Creating a page that executes a similar redirect-like action in JavaScript (window.location.href and window.location.replace). Again, works fine for a human with a JS-enable browser, but external systems do not like it.

  3. Toying around with the Data API to retrieve the file(s) that way. However, there seems to be no way to have a GET call to Bubble’s API that can run WITHOUT AUTHENTICATION. (And if there IS, it’s not clear to me that you can serve back a file – seems like what comes back is always JSON.)

So, the question is: Is there a way to accomplish what I’m trying to do? It SEEMs like what I need is a way in Bubble to create server-level redirects that the system could change whenever s3 URL changes due to the file having been modified. (Like “myapp(dot)com/[something]” points to “This_listing’s_ical_file’s_file’s_URL”)

Is that possible? Could that be implemented?

Thanks!
Keith

2 Likes