Generate a Presigned URL in Wasabi Using No Code Tool Bubble.io
If you're wondering how to create a presigned URL in Wasabi using Bubble.io, it is a bit of a trick to do. Unfortunately, Wasabi's API's doesn't provide a dedicated endpoint for generating presigned URLs directly. Presigned URLs are generated on the client-side using your access key, secret key, and a specific set of parameters.
So what exactly does this mean for you? If you're someone who does not code, you'll want to explain your problem to a freelancer on a site like Upwork or Fiverr and see if they can help. You'll also want to refer them to this article and they could understand your needs and provide you with a price for getting you setup.
Essentially, since Bubble.io doesn't support generating presigned URLs natively, you'll need to create a small server-side script to handle this task. Once you've decided on a cloud platform to run server-side script you'll use the below steps to get going. You'll want a cloud platform that supports Node.js, such as Heroku. So here are the steps necessary to do so with this configuration.
To deploy the Node.js app to Heroku, follow these ts:
-
Create a free Heroku account if you haven't already: https://signup.heroku.com/
-
Install the Heroku CLI: https://devcenter.heroku.com/articles/heroku-cli#download-and-install
-
Open a terminal on your local machine (not on Bubble.io) and log in to Heroku using the following command: (note "copy code" is disabled on this page)
-
Navigate to the directory where you created the Node.js project earlier.
-
Initialize a Git repository in your project folder: (note "copy code" is disabled on this page)
- Create a new file named
.gitignore
in the project directory and add the following content: (note "copy code" is disabled on this page)
- Commit your project to the Git repository: (note "copy code" is disabled on this page)
- Create a new Heroku app: (note "copy code" is disabled on this page)
- Deploy your app to Heroku: (note "copy code" is disabled on this page)
- Your Node.js app should now be deployed to Heroku. You'll see a URL similar to
https://your-app-name.herokuapp.com/
in the terminal. Use this URL to access the API you created.
Now, you can use the API in Bubble.io:
-
In your Bubble.io app, go to the "Plugins" tab and install the "API Connector" plugin if you haven't already.
-
Navigate to the Bubble API Connect plugin page
-
Click "Add another API."
-
Configure the API with the following settings:
- API Name: "Wasabi Presigned URL"
- Refer to the
Replace "your-app-name" with the actual name of your Heroku app.
-
Click "Add another call."
-
Configure the API call with the following settings:
- Set as an Action (not Data) so you can use it in a workflow
- Data type: "JSON"
- Use as: "GET"
- Base URL: "https://your-app-name.herokuapp.com/"
- Call name: "Generate Presigned URL"
- URL: "/generate-presigned-url"
- Parameters:
- Key: "bucket"
- Value: "your-bucket-name"
- Key: "key"
- Value: "your-object-key"
Replace "your-bucket-name" and "your-object-key" with the actual values for your Wasabi bucket and object.
- Click "Initialize call" to test the API call.
Once the API call is set up and working, you can use it in your Bubble.io app to generate presigned URLs for your users to download files directly from Wasabi.
For more information on how to use the API Connector in Bubble.io, refer to the official documentation: https://manual.bubble.io/core-resources/bubble-made-plugins/api-connector.html