Module: PresignedUpload::Uploadable

Includes:
Storage
Included in:
Model
Defined in:
lib/presigned_upload/uploadable.rb

Overview

The ‘Uploadable` module integrates storage functionality with a model, allowing handling file uploads and associated storage operations. It includes the capabilities provided by the `PresignedUpload::Storage` module.

This module is designed to be included in ActiveRecord models to facilitate common file upload operations, such as generating presigned URLs, deleting stored files, and managing upload status.

Examples:


class MyUploadableModel < ApplicationRecord
  include Uploadable::Model
end

model = MyUploadableModel.new(original_name: 'example.txt', content_type: 'text/plain', upload_status: :initial)
model.upload_url # Generates a presigned URL for file upload.
model.url        # Retrieves a presigned URL for accessing the stored file.

See Also:

Defined Under Namespace

Modules: Model

Method Summary

Methods included from Storage

#delete_file, #presigned_url