Sponsored Content
Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

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

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

Activity

  1. added
    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.
    on Aug 12, 2024
  2. added a commit that references this issue on Aug 12, 2024
    d17bc80
  3. BenWhitehead commented on Aug 12, 2024

    @BenWhitehead
    Collaborator

    Thanks for raising this issue, fix implemented in #2664

  4. added a commit that references this issue on Aug 13, 2024
    bae9bb9
  5. added a commit that references this issue on Aug 15, 2024
    e2f5537
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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