Files & Media
Upload and manage files from your app code. Every file gets a permanent CDN URL.
Proyecta provides a Files API via the SDK for programmatic file management from your app code.
Chat attachments
Section titled “Chat attachments”The chat input accepts images directly — paste a screenshot or drag an image file onto the input. Supported formats: PNG, JPEG, WebP, GIF. Maximum size: 10 MB per image.
Chat attachments are part of the message, not your file library. For persistent storage, use the SDK.
The Files API (SDK)
Section titled “The Files API (SDK)”Every published Proyecta app has access to a file storage API through the Proyecta SDK. The SDK currently supports listing and fetching files. Files are uploaded through the AI builder (see below) and get a permanent public CDN URL that you can reference from your app.
import Proyecta from '@proyecta-ai/sdk';
const proyecta = new Proyecta({ apiKey: process.env.PROYECTA_API_KEY });
// List files uploaded to your websiteconst files = await proyecta.files.list({ mime_type: 'image/*', path: '/uploads', query: 'logo',});
// Fetch a single file by IDconst file = await proyecta.files.get('file_abc123');console.log(file.url); // permanent CDN URLEach file carries:
| Field | Description |
|---|---|
id | Unique identifier (prefixed file_) |
url | Public CDN URL |
filename | Original filename at upload |
mime_type | image/jpeg, application/pdf, etc. |
size | Size in bytes |
path | Optional folder path (e.g. /images/blog) |
content_hash | SHA-256 of file contents |
metadata | Arbitrary key/value metadata |
How do files get uploaded to my app?
Section titled “How do files get uploaded to my app?”File uploads are handled through the AI builder. Ask the AI to build the upload flow for you:
"Let users upload a profile photo and store it in Proyecta Files""Add an image gallery where signed-in users can upload and view their photos""Let me attach PDF invoices to orders"
The AI wires up the upload in your app code using the backend file storage API and references the returned CDN URL. The upload flow is handled server-side — the public SDK currently provides read access (list and get) only.
Are the CDN URLs public?
Yes. Any file returned by the Files API has a public CDN URL. Don’t upload anything you don’t want exposed.
How big can a file be?
Per-file limits depend on your plan. Chat attachments are capped at 10 MB per image.
Can I resize or crop images at the URL?
On-the-fly image transforms (resize, crop, format conversion) are on the roadmap.
Coming soon
Section titled “Coming soon”- SDK upload method — upload files programmatically from your app code
- Image transformations via URL parameters (resize, crop, format conversion)
- Folder organization — create and manage folder paths in the panel
- “Add to Chat” from a file row, so library assets can be dropped into the AI conversation