Nuxt
Storage
Overview

Storage

With supastarter it's really easy to store files like images or other files in the cloud. supastarter uses this functionality for example to store the avatar images for users and teams, but you can use it for any other kind of files as well.

Storage Providers

supastarter supports multiple storage providers:

Uploading files in a serverless architecture

supastarter uses Next.js route handlers for providing the API, which have some limitations when being deployed on serverless platforms like Vercel or Netlify like a maximum execution time and a maximum payload size. These limitations are not a problem for most use cases, but if you need to upload very large files or need to process the files in a way that takes a long time, you might need to use a different approach.

That's why supastarter utilizes the presigned URLs feature of the storage providers to upload files. That means instead of sending the files to the serverless function, the client requests a presigned URL from the serverless function and then uploads the file directly to the storage provider. This way you can make sure to not expose any credentials, handle authorization and authentication and also don't need to worry about the limitations of the serverless platforms.