A stored file: what Storehouse.store/2 gives, and what an app keeps in
its records (or a document's data) to show and serve it again.
:key- its key in the store (Storehouse.key/2).:url- its URL, from the store.:name- the client's file name, for display only (Storehouse.clean_name/1).:content_type- the type its bytes prove (Storehouse.Check).:bytes- its size.:widthand:height- an image's, as a browser draws it (turned as a JPEG's EXIF says), ornil.:checksum- the SHA-256 of its bytes, in Base64 (as S3'sx-amz-checksum-sha256): the store checked it as it took the file, andStorehouse.checksum/1gives it of a copy, to compare.nilfor a file uploaded straight to a store that keeps none (Storehouse.verify_upload/2).:preview- the URL of a smaller image of it (a thumbnail, a PDF's first page, a video's poster), when the app made one, ornil.
Summary
Functions
Whether the file is an image (PNG, JPEG, GIF or WebP).
Types
@type t() :: %Storehouse.File{ bytes: non_neg_integer(), checksum: String.t() | nil, content_type: String.t(), height: pos_integer() | nil, key: Storehouse.Adapter.key(), name: String.t(), preview: String.t() | nil, url: String.t(), width: pos_integer() | nil }