Skip to content

Support Objects: compose as myBucket.combine #401

Description

@ryanseys

Here's a suggested usage:

var myBucket = storage.bucket('my-server-logs');
var log1 = myBucket.file('server-log-1');
var log2 = myBucket.file('server-log-2');

myBucket.combine({
  files: [log1, log2], // must all be in myBucket
  destination: 'combined-log-1-2' // new File in myBucket
}, function(err, newFile) {
  console.log(err, newFile);
});

Activity

  1. added this to the Storage Stable milestone on Feb 18, 2015
  2. stephenplusplus commented on Feb 19, 2015

    @stephenplusplus
    Contributor

    How about this (supporting string filenames and file objects equally):

    myBucket.combine(['log1', 'log2'], 'alllogs', function(err, newFile) {});
    
    myBucket.combine([
      myBucket.file('log1'),
      myBucket.file('log2')
    ], 'alllogs', function(err, newFile) {});
    
    myBucket.combine([
      myBucket.file('log1'),
      myBucket.file('log2')
    ], myBucket.file('alllogs'), function(err, newFile) {});
  3. ryanseys commented on Feb 20, 2015

    @ryanseys
    ContributorAuthor

    Yep SGTM

  4. stephenplusplus commented on Feb 23, 2015

    @stephenplusplus
    Contributor

    I'll get on this one 👍

  5. added a commit that references this issue on Feb 23, 2015
    2a81d2d
  6. added a commit that references this issue on Feb 24, 2015
    19ca624
  7. 52 remaining items

  8. added a commit that references this issue on Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions