> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alforse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archivos

> Subir y descargar originales, facturas, comprobantes y evidencias.

Las subidas usan presign, carga directa al almacenamiento y confirm. La API no acepta cuerpos de archivo crudos.

| Endpoint                  | Cuerpo/parámetros                                                          | Permiso              |
| ------------------------- | -------------------------------------------------------------------------- | -------------------- |
| `POST /files/presign`     | `fileName, contentType, sizeBytes, kind, subjectId, contractId, paymentId` | `contract_view view` |
| `PUT signed upload URL`   | `file bytes to object storage`                                             | `signed URL`         |
| `POST /files/confirm`     | `objectKey, fileName, contentType, sizeBytes, kind, uploadToken`           | `contract_view view` |
| `GET /files/:id/download` | `contractId, paymentId`                                                    | `contract_view view` |
