module

UploadService

Constants

Log = ::Log.for(self)

Class methods

authorize(file_path : String, actor_id : Int64) : Bool

Validates that an actor owns a specific upload.

Source
delete(path : String, actor_id : Int64, public_folder : String = Kemal.config.public_folder) : DeletionResult

Handles deleting a file.

Removes the uploaded file and cleans up empty parent directories.

Source
upload(file : File, filename : String, actor_id : Int64, public_folder : String = Kemal.config.public_folder, max_size : Int64 | Nil = 5242880, host : String = Ktistec.host) : UploadResult

Handles uploading a file.

Orchestrates the entire upload process from validation through storage.

Source

Nested types