From 6db57d14871d7f12ea2aaab0f020f1a0824498e6 Mon Sep 17 00:00:00 2001 From: "kim (grufwub)" Date: Sat, 11 Sep 2021 20:28:57 +0100 Subject: fix keys used to access storage items Signed-off-by: kim (grufwub) --- internal/media/processicon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/media/processicon.go') diff --git a/internal/media/processicon.go b/internal/media/processicon.go index b6b113b0c..17e48fec2 100644 --- a/internal/media/processicon.go +++ b/internal/media/processicon.go @@ -84,13 +84,13 @@ func (mh *mediaHandler) processHeaderOrAvi(imageBytes []byte, contentType string smallURL := fmt.Sprintf("%s/%s/%s/small/%s.%s", URLbase, accountID, mediaType, newMediaID, extension) // we store the original... - originalPath := fmt.Sprintf("%s/%s/%s/%s/%s.%s", mh.config.StorageConfig.BasePath, accountID, mediaType, Original, newMediaID, extension) + originalPath := fmt.Sprintf("%s/%s/%s/%s.%s", accountID, mediaType, Original, newMediaID, extension) if err := mh.storage.Put(originalPath, original.image); err != nil { return nil, fmt.Errorf("storage error: %s", err) } // and a thumbnail... - smallPath := fmt.Sprintf("%s/%s/%s/%s/%s.%s", mh.config.StorageConfig.BasePath, accountID, mediaType, Small, newMediaID, extension) + smallPath := fmt.Sprintf("%s/%s/%s/%s.%s", accountID, mediaType, Small, newMediaID, extension) if err := mh.storage.Put(smallPath, small.image); err != nil { return nil, fmt.Errorf("storage error: %s", err) } -- cgit v1.2.3