mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-15 07:57:54 +00:00
Move stuff around
This commit is contained in:
@@ -3,7 +3,6 @@ package attachment
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"heckel.io/ntfy/v2/log"
|
||||
@@ -38,15 +37,10 @@ func (b *s3Backend) List() ([]object, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
prefix := b.client.Prefix
|
||||
result := make([]object, 0, len(objects))
|
||||
for _, obj := range objects {
|
||||
id := obj.Key
|
||||
if prefix != "" {
|
||||
id = strings.TrimPrefix(id, prefix+"/")
|
||||
}
|
||||
result = append(result, object{
|
||||
ID: id,
|
||||
ID: obj.Key,
|
||||
Size: obj.Size,
|
||||
LastModified: obj.LastModified,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user