diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2025-11-04 12:17:09 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2025-11-04 12:17:09 +0500 |
| commit | a4638d4e1d122d9503b16ceda3aa5d9815aa7aea (patch) | |
| tree | 2cea2f19f3fd89a3aba4c407b99f3349b542bd61 | |
| parent | 981bc9608212bd762ed6cfb83856d600f6253850 (diff) | |
| download | seaweedfs-a4638d4e1d122d9503b16ceda3aa5d9815aa7aea.tar.xz seaweedfs-a4638d4e1d122d9503b16ceda3aa5d9815aa7aea.zip | |
clear TtlSeconds for volume
| -rw-r--r-- | weed/server/filer_server_handlers_write.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 4f1ca05be..31a4f4a41 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/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 != "" { destination = finalDestination } - query := r.URL.Query() so, err := fs.detectStorageOption0(ctx, destination, query.Get("collection"), @@ -99,7 +98,11 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte } 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) { glog.V(1).InfolnCtx(ctx, "post", r.RequestURI, ": ", "entry name too long") w.WriteHeader(http.StatusRequestURITooLong) |
