feat: add file move and trash retention
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user