Skip to content

Conversation

@cmrigney
Copy link
Contributor

@cmrigney cmrigney commented Dec 12, 2024

S3 and the Minio server both support conditional writes using If-None-Match and If-Match. Fwiw, this is already supported in the Go client.

Previously this was treating those parameters as metadata, but now they're treated as proper headers.

Example:

minioClient.putObject(
  "my-bucket",
  "my-object",
  "object-content",
  undefined,
  {
    "If-None-Match": "*",
  }
);

@prakashsvmx
Copy link
Member

Thank you for the contribution @cmrigney . Could you please add a functional test ?

@harshavardhana
Copy link
Member

Thank you for the contribution @cmrigney . Could you please add a functional test ?

@prakashsvmx lets take this and add functional tests ourselves.

@harshavardhana harshavardhana merged commit f4812b2 into minio:master Dec 18, 2024
10 checks passed
@cmrigney cmrigney deleted the support-if-match-headers branch December 18, 2024 17:07
@cmrigney
Copy link
Contributor Author

Thanks! Sorry, I hadn't got around to it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants