Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: support rewrite operation #1663

Merged
merged 4 commits into from
Oct 5, 2016

Conversation

stephenplusplus
Copy link
Contributor

Fixes #1373

Compare https://cloud.google.com/storage/docs/json_api/v1/objects/copy and https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite. It sounds like rewrite is basically copy, except with some added capabilities. I kept our method named copy, but we only use rewrite in this PR. LMKWYT.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 3, 2016
@stephenplusplus stephenplusplus added the api: storage Issues related to the Cloud Storage API. label Oct 3, 2016
@stephenplusplus
Copy link
Contributor Author

@Capstan is it safe to always send our users' "copy" requests to the rewrite API endpoint? It seems like it accepts more types of requests, but will ultimately do what the copy API endpoint does. Let me know if that's wrong and we need to support both endpoints individually. Thanks!

// @omaray

@Capstan
Copy link

Capstan commented Oct 3, 2016

Yes, it is always safe to send Copy requests to the Rewrite API endpoint. It will always handle cross-location, cross-storage class requests, whereas Copy may time out.

@stephenplusplus
Copy link
Contributor Author

Cool, thanks!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 7ce1970 on stephenplusplus:spp--1373 into 10cd2ac on GoogleCloudPlatform:master.

@@ -269,6 +269,12 @@ function File(bucket, name, options) {

util.inherits(File, common.ServiceObject);

/*! Developer Documentation
*
* @param {object=} options - Configuration object.

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants