Skip to content

Commit

Permalink
disable expiration logic
Browse files Browse the repository at this point in the history
seems to break and idk
  • Loading branch information
odrling committed Aug 22, 2024
1 parent 440daa2 commit cda082b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ func detectType(obj *minio.Object) (*mimetype.MIME, error) {
func serveObject(obj *minio.Object, range_header string) (*huma.StreamResponse, error) {
stat, err := obj.Stat()

if stat.Expires.Unix() != 0 && stat.Expires.Before(time.Now()) {
go DeleteObject(context.Background(), stat.Key)
return nil, huma.Error410Gone("File expired")
}
// if stat.Expires.Unix() != 0 && stat.Expires.Before(time.Now()) {
// go DeleteObject(context.Background(), stat.Key)
// return nil, huma.Error410Gone("File expired")
// }

return &huma.StreamResponse{
Body: func(ctx huma.Context) {
Expand Down

0 comments on commit cda082b

Please sign in to comment.