Attach files and images to your database

Reduce the number of services you manage and securely attach files — images, documents, binaries, and more — directly to a database record.

Start freeDocumentationExample app

Fast retrieval

Lightning fast file retrieval with an integrated CDN for low latency access.

Learn More

Secure by default

Control access through your database roles and URL access levels.

Learn More

On-the-fly transformations

Perform resize, crop, rotate, and many other transformations in-code through the SDKs.

Learn More

Built-in search

Files are storage directly on records in your database, making it easy to search and filter your files.

Learn More

Sleek administration

Add the File column type to your database and immediately start uploading content into the Xata app.

Store images, movies, PDFs and other files types. Preview your uploads in the app, regardless of their size.

Add column to table

Image transformations

Compress, style, resize and format your images on the fly.

// Get a specific record from the "gallery" database
const record = await xata.db.gallery.read('record_id');

const { url } = record.imageColumnName.transform({
  height: 100,
  rotate: 180,
  format: 'webp'
});

Original

original

Transformed

transformed

File access control

Keep files private, make them public, or use signed URLs to enable time-limited access.

// Set the timeout to be 10 minutes for this user's photo
const user = await xata.db.Users.update('record_id', {
  photo: {
    signedUrlTimeout: 600 // In seconds
  }
});

// Retrieve the signed URL on the file in the "photo" column
const { signedUrl } = user.photo.transform({ quality: 50 });

Explore more resources

Learn by example

Try out a sample app

Built with Next.js, Chakra UI, and Xata, the sample app will help you learn how to query, paginate and search records with a heavy focus on file attachments.

Add column to table

Start free,
pay as you grow

Xata provides the best free plan in the industry. It is production ready by default and doesn't pause or cool-down. Take your time to build your business and upgrade when you're ready to scale.

Free plan includes
  • 10 database branches
  • High availability
  • 15 GB data storage
  • 15 GB search engine storage
  • 2 GB file attachments
  • 250 AI queries per month
Start freeExplore all plans
Free plan includes
  • 10 database branches
  • High availability
  • 15 GB data storage
  • 15 GB search engine storage
  • 2 GB file attachments
  • 250 AI queries per month
Add column to table

Copyright © 2024 Xatabase Inc.
All rights reserved.

Product

RoadmapFeature requestsPricingStatusAI solutionsFile attachments