Skip to content

GCS: is the correct event 'complete' or 'finish' for uploading? #849

@theacodes

Description

@theacodes

When uploading a file, eg:

      var stream = file.createWriteStream();

      stream.on('error', function(err) {
        uploadedFile.cloudStorageError = err;
        checkNext();
      });

      stream.on('complete', function() {
        next();
      });

      stream.end(buffer);

Is the correct event complete or finish. The docs say complete, but a user reported an issue with using complete and that finish was the one that worked for him. In my testing, both work with gcloud 0.20.0.

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions