Skip to content

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.

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.

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 website
const files = await proyecta.files.list({
mime_type: 'image/*',
path: '/uploads',
query: 'logo',
});
// Fetch a single file by ID
const file = await proyecta.files.get('file_abc123');
console.log(file.url); // permanent CDN URL

Each file carries:

FieldDescription
idUnique identifier (prefixed file_)
urlPublic CDN URL
filenameOriginal filename at upload
mime_typeimage/jpeg, application/pdf, etc.
sizeSize in bytes
pathOptional folder path (e.g. /images/blog)
content_hashSHA-256 of file contents
metadataArbitrary key/value metadata

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.

  • 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