files

Upload File

Upload one file (multipart: file, optional path, source and overwrite).

The multipart body is parsed MANUALLY inside the handler instead of declaring UploadFile = File(...) parameters. FastAPI parses a declared multipart body BEFORE dependencies run; with manual parsing, ownership auth (get_authorized_company) and the rate limit run first, and the body's size is bounded before it is read (read_capped_form: no length is a 411, an oversized one a 413, and the stream is counted as it arrives so a lying client is refused mid-body). Starlette's multipart parser spools parts over 1MB to a temp file, so large uploads never sit in RAM. Trade-off: the OpenAPI requestBody for this route is intentionally undocumented; the frontend uploads with a raw fetch + FormData.

post/companies/{company_id}/files

Request

  • Base URL: https://api.nanocorp.so (the document declares no server; this is the origin it was published from)
  • URL: https://api.nanocorp.so/companies/{company_id}/files
  • Auth: HTTP bearer

Path parameters

company_idstring uuid required

Response

Successful Response

idstring required
pathstring required
size_bytesinteger required
content_typestring nullable required
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 39 revisions of this API.