googleapis/java-storage

com.google.cloud.storage.Storage: Cannot clear BlobInfo attributes on update

Closed this issue · 1 comments

RG9 commented

Environment details

  • version: google-cloud-storage-2.40.1.jar
  • Java version: 21.0.2

What I want to do using Java API and how it works currently using frontend?

I want to clear (set null) attribute Content-Disposition.

If I left empty Content-Disposition field in following form, then reading value of Blob#getContentDisposition I get null.
Screenshot from 2024-08-09 18-38-32

Javadoc says that it should be possible using update method:
Screenshot from 2024-08-08 20-21-19

Steps to reproduce

  1. Execute Storage#update like this:
    Screenshot from 2024-08-08 20-21-02

Current behavior

contentDisposition value didn't change.

Expected behavior

contentDisposition value should be cleared (set to null).

Debugging

  1. Debugger says that CONTENT_DISPOSITION is modified:
    Screenshot from 2024-08-08 20-21-45
  2. In request's content there is no contentDisposition:
    Screenshot from 2024-08-08 20-25-32

Thanks for raising this issue, fix implemented in #2664