MCPcopy
hub / github.com/filebrowser/filebrowser / delThumbs

Function delThumbs

http/resource.go:329–338  ·  view source on GitHub ↗
(ctx context.Context, fileCache FileCache, file *files.FileInfo)

Source from the content-addressed store, hash-verified

327}
328
329func delThumbs(ctx context.Context, fileCache FileCache, file *files.FileInfo) error {
330 for _, previewSizeName := range PreviewSizeNames() {
331 size, _ := ParsePreviewSize(previewSizeName)
332 if err := fileCache.Delete(ctx, previewCacheKey(file, size)); err != nil {
333 return err
334 }
335 }
336
337 return nil
338}
339
340func patchAction(ctx context.Context, action, src, dst string, d *data, fileCache FileCache) error {
341 switch action {

Callers 3

resourceDeleteHandlerFunction · 0.85
resourcePostHandlerFunction · 0.85
patchActionFunction · 0.85

Calls 4

PreviewSizeNamesFunction · 0.85
ParsePreviewSizeFunction · 0.85
previewCacheKeyFunction · 0.85
DeleteMethod · 0.65

Tested by

no test coverage detected