File uploads

Here's how file uploads work with endpoints that accept file parameters:

  1. The client makes an API call to Circle's API, sending file information.

  2. The server requests a pre-signed URL from our storage based on the file information received.

  3. The storage returns the pre-signed URL to the server.

  4. The server returns the pre-signed URL to the client as a response to the initial API call.

  5. The client uses this URL to upload the file directly to the storage, which sends a confirmation to the client.

Request

To perform the first API call to the Member API, you need to mount the request correctly.

The checksum attribute is a Base64 version of your file MD5. Here's a TypeScript sample of how mounting those files in a browser will look like.

Response

The important key here is direct_upload, that's where the signed url that the file will be sent to is, it's also the place where the headers live, those will also be sent to the same URL as part of the PUT request.

here's an example on how the request would look like in TypeScript.

Last updated