Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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