AWS S3 File Uploader

Overview

Arqam Saleem

Last Update 2 years ago

The AWS S3 File Uploader plugin provides a robust solution for integrating AWS S3 file uploads and management within your Bubble.io application. This plugin is designed to facilitate seamless file storage, retrieval, and management in a secure and scalable environment. With features that allow customizable handling of file uploads and the ability to manage objects in your S3 bucket, this plugin is an essential tool for any application requiring file storage capabilities.
Features
  • Effortless File Upload to S3: Directly integrate file uploads to your AWS S3 buckets, with the option to specify folders for organized storage.

  • Customizable File Handling: Configure file and folder parameters, set upload limits, and control file size restrictions for a smooth user experience.

  • Flexible Object Management: Retrieve objects from your S3 bucket, with options for generating signed URLs and deleting objects as needed.

Plugin Elements and Actions
AWS - Uploader
Events:
  • Files Uploaded: Triggered when files are successfully uploaded to the element; can be used to manually start uploads to your bucket.
  • Too Many Files: Triggered if the number of files exceeds the defined limit.
  • File Too Big: Triggered when a file exceeds the maximum allowed size.
Element Actions
  • upload_files/folder: Upload files to a specific S3 bucket, with the option to store them in a designated folder for better organization.
S3 Object
Element Actions:
  • load_objects_from_bucket: Retrieve a defined number of objects from a specified bucket. The retrieved data is accessible via element reference for easy use.
Additional Actions:
  • get signed Url: Generate a signed URL for secure access to an object. Input the object key/name to retrieve the URL.
  • delete object: Delete an object by specifying its key/name, enabling precise and secure content management.
Setup Instructions
  1. Place the Required Element on the Page:

    • Add either the "AWS - Uploader" or "S3 Object" element to your Bubble page to begin using the plugin.
  2. Set Up Your Bucket and IAM User:

    • Create an AWS S3 bucket and configure an IAM user with appropriate access keys to allow access to the bucket. Ensure that the CORS settings on the bucket are adjusted to permit access from your website.
  3. Add IAM Keys to the Plugin:

    • In the plugin settings, input your IAM access keys to enable secure access to your S3 bucket.
  4. Configure Bucket Credentials in the Element:

    • Within the element settings, add your bucket name and relevant configuration details. Once set, you're ready to upload, retrieve, and manage files in S3!
Managing File Upload and Retrieval Logic

Utilize exposed states and dynamic actions to customize the upload and retrieval processes, ensuring files are handled securely and efficiently. This flexibility allows you to tailor the plugin's behavior to meet your application's specific needs.

Was this article helpful?

1 out of 1 liked this article