Browse Source

clear TtlSeconds for volume

pull/7426/head
Konstantin Lebedev 1 month ago
parent
commit
a4638d4e1d
  1. 7
      weed/server/filer_server_handlers_write.go

7
weed/server/filer_server_handlers_write.go

@ -77,7 +77,6 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte
if finalDestination := r.Header.Get(s3_constants.SeaweedStorageDestinationHeader); finalDestination != "" { if finalDestination := r.Header.Get(s3_constants.SeaweedStorageDestinationHeader); finalDestination != "" {
destination = finalDestination destination = finalDestination
} }
query := r.URL.Query() query := r.URL.Query()
so, err := fs.detectStorageOption0(ctx, destination, so, err := fs.detectStorageOption0(ctx, destination,
query.Get("collection"), query.Get("collection"),
@ -99,7 +98,11 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte
} }
return return
} }
if so.TtlSeconds > 0 {
if S3expiresEnabled := r.Header.Get(s3_constants.SeaweedFSExpiresS3); S3expiresEnabled != "" {
so.TtlSeconds = 0
}
}
if util.FullPath(r.URL.Path).IsLongerFileName(so.MaxFileNameLength) { if util.FullPath(r.URL.Path).IsLongerFileName(so.MaxFileNameLength) {
glog.V(1).InfolnCtx(ctx, "post", r.RequestURI, ": ", "entry name too long") glog.V(1).InfolnCtx(ctx, "post", r.RequestURI, ": ", "entry name too long")
w.WriteHeader(http.StatusRequestURITooLong) w.WriteHeader(http.StatusRequestURITooLong)

Loading…
Cancel
Save