Uploading files to your bucket can be done in multiple ways, each suited for different use cases and requirements. This page provides a brief introduction to the available upload methods and their respective pros and cons to help you choose the best option for your needs.

Uploading through the UI

The UI provides a user-friendly way to upload files directly to your bucket.

Pros:

  • Easy to use with a graphical interface
  • Supports uploading multiple files at once
  • Allows for file previews, downloads, presigned URL generation, and deletion
  • Folder creation for better organization

Cons:

  • Requires manual intervention
  • Not suitable for automated workflows

Uploading through a Flow

The File Storage Action allows direct file uploads from an API Route, Workflow, or Function.

Pros:

  • Can be integrated into automated workflows
  • Suitable for files up to 10MB
  • Enables advanced automation scenarios

Cons:

  • Limited to files sent to your API Route
  • Currently supports a maximum file size of 10MB
  • Utilizes Flow runs, which may impact application limits

Uploading Programmatically

Send a PUT request to a presigned URL obtained from the File Storage Action.

Pros:

  • Can be used in any application or service
  • Supports larger files compared to Flow-based uploads
  • File size up to 100MB
  • Does not consume Flow runs

Cons:

  • Requires handling of HTTP requests and responses in your code
  • Less user-friendly than the UI method

Multipart Upload

Multipart upload allows you to upload large files by splitting them into smaller parts.

Pros:

  • Efficient for uploading large files
  • Resumable uploads, allowing re-transmission of failed parts
  • Parallel uploads reduce overall upload time
  • Recommended for file larger than 10MB

Cons:

  • More complex implementation

We recommend using the Single File Upload via the programmatic approach as it leverages a Global CDN, making uploads faster and more widely available. Additionally, it does not consume any Flow runs of your application, providing better performance and scalability.

By understanding the pros and cons of each upload method, you can choose the best approach for your specific use case, whether you need a simple UI-based upload, integration into automated workflows, or efficient handling of large files.