Printago API
POST /v1/store-files

Add a file to the library

Registers a file already uploaded to the staging area: the server moves it into the library, hashes it, and parses kind-specific metadata (for fonts, the family and style from the font's own name table). Uploading bytes the library already holds returns the existing entry.

Requires: file.manage

Request Body

RegisterStoreFileRequest
kindrequired
"font" | "openscad_library" | "python_module" | "asset"
fontopenscad_librarypython_moduleasset
licenseAttestedoptional
boolean
The uploader confirms they hold the rights to use this file for rendering. Required for `font`.
originalFilenamerequired
string
uploadPathrequired
string
`uploads:`-prefixed staging URI the bytes were uploaded to.

Example Request

application/json
{
  "kind": "font",
  "uploadPath": "string",
  "originalFilename": "string",
  "licenseAttested": true
}

Response Schema

StoreFile
createdAtrequired
string
format: date-time
idrequired
string
pattern: ^[a-z0-9]{24}$
kindrequired
"font" | "openscad_library" | "python_module" | "asset"
fontopenscad_librarypython_moduleasset
licenseAttestedAtrequirednullable
string
format: date-time
licenseAttestedByUserIdrequirednullable
string
metadatarequired
Record<string, any>
Construct a type with a set of properties K of type T
mimeTyperequired
string
originalFilenamerequired
string
sha256requirednullable
string
sizeBytesrequirednullable
number
storagePathrequired
string
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
updatedAtrequired
string
format: date-time

Example Response

201 OK — application/json
{
  "kind": "font",
  "storagePath": "string",
  "originalFilename": "string",
  "mimeType": "string",
  "sizeBytes": 1,
  "sha256": "string",
  "licenseAttestedAt": "2025-01-15T12:00:00.000Z",
  "licenseAttestedByUserId": "string",
  "metadata": {},
  "id": "string",
  "storeId": "string",
  "createdAt": "2025-01-15T12:00:00.000Z",
  "updatedAt": "2025-01-15T12:00:00.000Z"
}