module Latch::Extractor

Overview

Extractors try to extract metadata from the context they're given: the IO object, the current state of the resulting metadata hash, or arbitrary options passed to the upload method of the uploader.

Direct including types

Defined in:

latch/extractor.cr

Instance Method Summary

Instance Method Detail

abstract def extract(uploaded_file : Latch::UploadedFile, metadata : MetadataHash, **options) : MetadataValue | Nil #

Extracts metadata and returns a MetadataValue. Alternatively, the metadata hash may be modified directly if multiple values need to be added (e.g. the dimensions of an image).


[View source]