Skip to content

Allow setting metadata atomically on initial upload #84

Open
@broccolihighkicks

Description

@broccolihighkicks

The "create and then update" workflow does not work well in some cases.

E.g. I am setting obj.cache_control = Some("no-store".to_string()); obj.update().await to prevent GCS's default forced cache of one hour (which cannot be circumvented from the browser).

Two issues:

    1. Sometimes that update request succeeds but the metadata of the object is not updated for some reason (I think this may be an error Google's end when writing the same object many times).
    1. If I am creating/updating the object, it may have been replaced by the time the update runs.

Is it possible to add metadata to Object::create so that this happens in one single request instead of two?

This would solve the two issues above by making object-creation-with-metadata a single atomic step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions