Skip to content

POST   /files/{table_name}/{id}

Get an AWS url to upload to

Upload a file for an entity.

Business Rules

  • Maximum size: 10MB
  • Allowed MIME types only
  • Files are virus scanned
  • Metadata is extracted
  • Checksums verified

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

table_name   path string

Entity type

id   path string

Entity ID

Optional Parameters

Click here to view an exhaustive list of all available parameters
additionalKey   query string

An additional key to categorize or organize your file uploads against this entity. ie additional_documents, photos, etc... defaults to __DEFAULT__

Request Body

{
"fileObject": {
"name": "string",
"type": "string",
"size": "string"
},
"hash": "string"
}

Try it out

Loading...

Output:

Responses

Description

File uploaded

{
"url": "string"
}

Route Source Code

Check out the source code for this route entrypoint here: /files/[table_name]/[id]/route.ts

Or the swagger.yaml spec this documentation was generated from: /files/swagger.yaml