summaryrefslogtreecommitdiff
path: root/internal/media/processicon.go
diff options
context:
space:
mode:
authorLibravatar kim (grufwub) <grufwub@gmail.com>2021-09-11 20:28:57 +0100
committerLibravatar kim (grufwub) <grufwub@gmail.com>2021-09-11 20:28:57 +0100
commit6db57d14871d7f12ea2aaab0f020f1a0824498e6 (patch)
treecd7570bc3d5c12a90d9aa5f8f4442547b3706213 /internal/media/processicon.go
parentrename KVStore uses as storage to differentiate between upcoming store package (diff)
downloadgotosocial-6db57d14871d7f12ea2aaab0f020f1a0824498e6.tar.xz
fix keys used to access storage items
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
Diffstat (limited to 'internal/media/processicon.go')
-rw-r--r--internal/media/processicon.go4
1 files changed, 2 insertions, 2 deletions
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)
}