Introducing New Features in our Upload API

Hello everyone,

We’re excited to announce that our Upload API now supports the ability to make POST requests for file uploads with the ability to specify the name for your file and also select a destination folder using the Folder ID.

Prerequisites:

Before we get started, make sure you have the following:

  • A Builder account with Developer or Admin permissions. This is necessary to create a Private API Key.
  • Private API Key. You can generate one by Creating a Private API Key.

To enhance the organization of your resources, you can now use folders to structure your files. These can be accessed conveniently from the Sidebar menu.

Now, let’s dive in and see how it’s done.

1. Uploading a File by Specifying Only the File Name:

When making a request, use the query parameter name with the value <filename>.<extension> (e.g., Mustang.jpg).

Here’s a sample request using cURL:

curl --location 'https://builder.io/api/v1/upload?name=fileName.ext' \
--header 'Content-Type: image/png' \
--header 'Authorization: Bearer <Private API Key>' \
--data-binary '@/path/to/your-file.ext'

It’s recommended to always include the name parameter when uploading a file.

2. Uploading a File to a Specific Folder:

To upload a file to a designated folder, follow these steps:

With the Folder ID in hand, you can now create a sample request with both the name and folder parameters:

curl --location 'https://builder.io/api/v1/upload?folder=<FOLDER_ID_HERE>&name=fileName.ext \
--header 'Content-Type: image/png' \
--header 'Authorization: Bearer <Private API Key>' \
--data-binary '@/path/to/your-file.ext'

For more detailed examples and code samples, check out our documentation.

Enjoy seamless file uploading with our enhanced Upload API!
Happy POSTing! :slight_smile:

1 Like

Awesome!

Unfortunately, we’re currently blocked on a few projects using the Upload API for video’s (video/mp4) - perhaps other mime types are impacted. The errors produced are generating a 500 internal server error. Images appear to be fine, it’s mostly videos that are affecting us most.

Any insight on when a fix may be pushed?

@lwilson
We apologize for the inconvenience you’re facing with the Upload API for videos. Our team is actively investigating the issue, and we’re working diligently to resolve it as soon as possible. While we don’t have an exact ETA for the fix, rest assured we’re prioritizing this to minimize disruption. We’ll keep you updated on any developments. Thank you for your patience.

Hi @lwilson,
Just wanted to let you know the issue with Video Upload API was resolved. Please feel free to let us know if you have any questions or concerns.