feat: add file move and trash retention
All checks were successful
CI / hygiene (push) Successful in 2s
Build and Deploy / build-and-deploy (push) Successful in 30s
CI / test (push) Successful in 19s

This commit is contained in:
Grendgi
2026-06-16 14:40:28 +03:00
parent 2723f20ab0
commit 3de4e5dfe7
7 changed files with 176 additions and 13 deletions

View File

@@ -137,6 +137,13 @@ func (s *Storage) GetObject(ctx context.Context, key string, rangeStart, rangeEn
return obj, &ObjectInfo{Size: info.Size, ContentType: info.ContentType}, nil
}
func (s *Storage) RemoveObject(ctx context.Context, key string) error {
if !s.Configured() {
return errors.New("storage not configured")
}
return s.client.RemoveObject(ctx, s.cfg.Bucket, key, minio.RemoveObjectOptions{})
}
func ParseRange(header string, totalSize int64) (start, end int64, ok bool) {
if !strings.HasPrefix(header, "bytes=") {
return 0, 0, false