diff options
author | 2021-09-12 10:10:24 +0100 | |
---|---|---|
committer | 2021-09-12 10:10:24 +0100 | |
commit | f6492d12d948507021bbe934de94e87e20464c01 (patch) | |
tree | 6705d6ef6f3c4d70f3b3ebc77c2960d8e508cf37 /internal/media/processicon.go | |
parent | Merge pull request #213 from superseriousbusiness/alpine+node_upstep (diff) | |
parent | fix keys used to access storage items (diff) | |
download | gotosocial-f6492d12d948507021bbe934de94e87e20464c01.tar.xz |
Merge pull request #214 from NyaaaWhatsUpDoc/improvement/update-storage-library
add git.iim.gay/grufwub/go-store for storage backend, replacing blob.Storage
Diffstat (limited to 'internal/media/processicon.go')
-rw-r--r-- | internal/media/processicon.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/media/processicon.go b/internal/media/processicon.go index 5fae63198..17e48fec2 100644 --- a/internal/media/processicon.go +++ b/internal/media/processicon.go @@ -84,14 +84,14 @@ 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) - if err := mh.storage.StoreFileAt(originalPath, original.image); err != nil { + 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) - if err := mh.storage.StoreFileAt(smallPath, small.image); err != nil { + 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) } |