type
UploadConfig
Validation, privacy, and image-variant policy for an upload collection.
Properties
| Property | Type | Description |
|---|---|---|
MaxFileSize | int64 | Accepted byte limit; zero uses the framework default and values above 256 MiB are rejected. |
MimeTypes | []string | Allowed media types; empty accepts any supported type. |
Private | bool | Requires authorized delivery instead of public object URLs. |
ImageSizes | []ImageSize | Derived variants generated for supported image uploads. |
MaxImageDimension | int | MaxImageDimension 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.