这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@RG9

Description

@RG9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions