MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / WithThumb

Function WithThumb

pkg/filemanager/manager/entitysource/entitysource.go:142–146  ·  view source on GitHub ↗

WithThumb set entity source as thumb. This will result in entity source URL generated with thumbnail processing parameters. For sidecar thumb files, this option will be ignored.

(isThumb bool)

Source from the content-addressed store, hash-verified

140// generated with thumbnail processing parameters. For sidecar thumb files,
141// this option will be ignored.
142func WithThumb(isThumb bool) EntitySourceOption {
143 return EntitySourceOptionFunc(func(option any) {
144 option.(*EntitySourceOptions).IsThumb = isThumb
145 })
146}
147
148// WithDisableCryptor disable cryptor for file source, file stream will be
149// presented as is.

Callers 2

ServeMethod · 0.92
GetEntitySourceMethod · 0.92

Calls 1

EntitySourceOptionFuncFuncType · 0.85

Tested by

no test coverage detected