mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-07 11:36:25 +02:00
Rearrange processing options
This commit is contained in:
parent
88984c02c3
commit
8a081a917e
@ -529,15 +529,6 @@ eth:%enforce_thumbnail
|
||||
|
||||
When set to `1`, `t` or `true` and the source image has an embedded thumbnail, imgproxy will always use the embedded thumbnail instead of the main image. Currently, only thumbnails embedded in `heic` and `avif` are supported. This is normally controlled by the [IMGPROXY_ENFORCE_THUMBNAIL](configuration.md#miscellaneous) configuration but this procesing option allows the configuration to be set for each request.
|
||||
|
||||
### Return attachment
|
||||
|
||||
```
|
||||
return_attachment:%return_attachment
|
||||
att:%return_attachment
|
||||
```
|
||||
|
||||
When set to `1`, `t` or `true`, imgproxy will return `attachment` in the `Content-Disposition` header, and the browser will open a 'Save as' dialog. This is normally controlled by the [IMGPROXY_RETURN_ATTACHMENT](configuration.md#miscellaneous) configuration but this procesing option allows the configuration to be set for each request.
|
||||
|
||||
### Quality
|
||||
|
||||
```
|
||||
@ -706,6 +697,15 @@ Defines a filename for the `Content-Disposition` header. When not specified, img
|
||||
|
||||
Default: empty
|
||||
|
||||
### Return attachment
|
||||
|
||||
```
|
||||
return_attachment:%return_attachment
|
||||
att:%return_attachment
|
||||
```
|
||||
|
||||
When set to `1`, `t` or `true`, imgproxy will return `attachment` in the `Content-Disposition` header, and the browser will open a 'Save as' dialog. This is normally controlled by the [IMGPROXY_RETURN_ATTACHMENT](configuration.md#miscellaneous) configuration but this procesing option allows the configuration to be set for each request.
|
||||
|
||||
### Preset
|
||||
|
||||
```
|
||||
|
@ -88,7 +88,6 @@ type ProcessingOptions struct {
|
||||
StripColorProfile bool
|
||||
AutoRotate bool
|
||||
EnforceThumbnail bool
|
||||
ReturnAttachment bool
|
||||
|
||||
SkipProcessingFormats []imagetype.Type
|
||||
|
||||
@ -101,7 +100,8 @@ type ProcessingOptions struct {
|
||||
PreferAvif bool
|
||||
EnforceAvif bool
|
||||
|
||||
Filename string
|
||||
Filename string
|
||||
ReturnAttachment bool
|
||||
|
||||
UsedPresets []string
|
||||
|
||||
@ -916,8 +916,6 @@ func applyURLOption(po *ProcessingOptions, name string, args []string) error {
|
||||
return applyStripColorProfileOption(po, args)
|
||||
case "enforce_thumbnail", "eth":
|
||||
return applyEnforceThumbnailOption(po, args)
|
||||
case "return_attachment", "att":
|
||||
return applyReturnAttachmentOption(po, args)
|
||||
// Saving options
|
||||
case "quality", "q":
|
||||
return applyQualityOption(po, args)
|
||||
@ -936,6 +934,8 @@ func applyURLOption(po *ProcessingOptions, name string, args []string) error {
|
||||
return applyExpiresOption(po, args)
|
||||
case "filename", "fn":
|
||||
return applyFilenameOption(po, args)
|
||||
case "return_attachment", "att":
|
||||
return applyReturnAttachmentOption(po, args)
|
||||
// Presets
|
||||
case "preset", "pr":
|
||||
return applyPresetOption(po, args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user