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

docs: document destination option #633

Merged
merged 3 commits into from
Mar 26, 2019

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Mar 15, 2019

It's often the case that a user wants to change the destination name of an object they're uploading, but it's pretty buried in the docs.

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 15, 2019
@bcoe bcoe requested a review from crwilcox March 15, 2019 21:15
@@ -116,6 +116,8 @@ async function uploadFile(bucketName, filename) {
await storage.bucket(bucketName).upload(filename, {
// Support for HTTP requests made with `Accept-Encoding: gzip`
gzip: true,
// By setting the option `destination`, you can change the name of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little weird for me to read the comment in this context. I'd expect to see something like this above a destination property in the obj, which could be commented out, but there for illustration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so perhaps:

// destination: destinationFilename (defaults to filename)

@codecov
Copy link

codecov bot commented Mar 15, 2019

Codecov Report

Merging #633 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #633   +/-   ##
=======================================
  Coverage   97.94%   97.94%           
=======================================
  Files           9        9           
  Lines         874      874           
  Branches       99       99           
=======================================
  Hits          856      856           
  Misses          9        9           
  Partials        9        9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c73d441...5abc9f9. Read the comment docs.

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Mar 22, 2019
@JustinBeckwith JustinBeckwith added the automerge Merge the pull request once unit tests and other checks pass. label Mar 26, 2019
@JustinBeckwith JustinBeckwith merged commit b9bbab9 into master Mar 26, 2019
@stephenplusplus stephenplusplus deleted the show-how-to-change-destination branch March 26, 2019 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement. 🚨 This issue needs some love.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants