From 311ab744fe1bf278b18c25892497271988399e9a Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Tue, 4 Jul 2023 18:38:10 +0200 Subject: feat: Add user based files Now files follow user path configuration --- pkg/view/media.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/view/media.go') diff --git a/pkg/view/media.go b/pkg/view/media.go index 0b588f4..bea515d 100644 --- a/pkg/view/media.go +++ b/pkg/view/media.go @@ -98,7 +98,9 @@ func (self *MediaView) GetThumbnail(ctx *fasthttp.RequestCtx) error { path, err := self.mediaRepository.GetThumbnailPath(ctx, pathHash) if err != nil { - return self.GetImage(ctx) + ctx.Redirect("/media/image?path_hash="+pathHash, 307) + // nolint: nilerr + return nil } ctx.Request.Header.SetContentType("image/jpeg") -- cgit v1.2.3