module

Latch::UploadedFile

Interface for uploaded file objects. Include this module in your framework's uploaded file class to make it compatible with Latch.

Only tempfile and filename are required. The other methods have sensible defaults that can be overridden.

struct MyUploadedFile
  include Latch::UploadedFile

  getter tempfile : File
  getter filename : String

  def initialize(@tempfile, @filename)
  end
end

Instance methods

content_type
Source
filename
Source
path
Source
size
Source
tempfile
Source