mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-05 15:09:30 -06:00
encode gifs properly
This commit is contained in:
parent
2fa5519d55
commit
2e7ac10d00
15 changed files with 304 additions and 66 deletions
|
|
@ -21,7 +21,6 @@ package testrig
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/storage"
|
||||
)
|
||||
|
|
@ -39,13 +38,13 @@ func NewTestStorage() storage.Storage {
|
|||
func StandardStorageSetup(s storage.Storage, relativePath string) {
|
||||
stored := NewTestStored()
|
||||
a := NewTestAttachments()
|
||||
for k, fileNameTemplate := range stored {
|
||||
for k, paths := range stored {
|
||||
attachmentInfo, ok := a[k]
|
||||
if !ok {
|
||||
panic(fmt.Errorf("key %s not found in test attachments", k))
|
||||
}
|
||||
filenameOriginal := strings.Replace(fileNameTemplate, "*", "original", 1)
|
||||
filenameSmall := strings.Replace(fileNameTemplate, "*", "small", 1)
|
||||
filenameOriginal := paths.original
|
||||
filenameSmall := paths.small
|
||||
pathOriginal := attachmentInfo.File.Path
|
||||
pathSmall := attachmentInfo.Thumbnail.Path
|
||||
bOriginal, err := os.ReadFile(fmt.Sprintf("%s/%s", relativePath, filenameOriginal))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue