Uploading Files

Understand the different methods for uploading files to Vulgate, including single and multipart uploads.

Upload modes

Ingesting files is a two-step process. First, you upload the files, and then start the ingestion process.

Vulgate supports two upload modes: single and multipart.

Single upload

To upload a file at once, follow these two steps:

  1. Obtain a signed URL for the file upload.
  2. Make a PUT request to the signed URL with the file content.

Obtaining a signed URL

To obtain a signed URL for the file upload, use the following endpoint:

GET /api/uploads

The following parameters are supported as URL search params:

ParameterTypeDefaultDescription
namestringRequiredThe name of the file
typestringRequiredThe content type of the file

For example:

GET /api/uploads?name=example.pdf&type=application/pdf

The response schema is as follows:

{
    "url": "https://your-signed-url.com",
    "method": "PUT",
    "headers": {
      "content-type": "application/pdf",
      "x-amz-meta-name": "example.pdf"
    }
}

Making a PUT request

To upload the file, make a PUT request to the signed URL with the file content. The request should include the headers specified in the response object.

For example:

PUT your-signed-url.com HTTP/1.1
Content-Type: application/pdf
X-Amz-Meta-Name: example.pdf
 
<file content>

Multipart upload

To upload larger files in multiple parts, follow these steps:

  1. Initiate a multipart upload
  2. Make a POST request to the signed URL with the file content.

(To be documented)

Uploading Files | Vulgate AI