type

UploadConfig

Validation, privacy, and image-variant policy for an upload collection.

Properties

PropertyTypeDescription
MaxFileSizeint64Accepted byte limit; zero uses the framework default and values above 256 MiB are rejected.
MimeTypes[]stringAllowed media types; empty accepts any supported type.
PrivateboolRequires authorized delivery instead of public object URLs.
ImageSizes[]ImageSizeDerived variants generated for supported image uploads.
MaxImageDimensionintMaxImageDimension scales a JPEG or PNG original wider or taller than this many pixels down to fit before it is stored. The scaled image replaces the original, including the private source later crops start from, and image sizes are made from it. Zero keeps originals at their uploaded size. It must be at least the width and height of every image size.

How it works

Upload collections also require Config.Storage, a stable StorageNamespace, and a store implementing UploadObjectLocker. Image variants are generated only for supported images.

Full signature