Skip to content

gcloud writestreams no longer working when piping stdout from GraphicsMagick #889

Description

@jseeley78

GraphicsMagick lib:
http://aheckmann.github.io/gm/

ex:

var gm = require('gm').subClass({ imageMagick: true }),
      src = '/src/file.jpg',
      dst = myBucket.file('file.png');

var wr = dst.createWriteStream();

gm(src)
    .setFormat('png')
    .stream(function(err, stdout, stderr) {
    if (err) return cb(err);
    // pipe output to writestream
    stdout.pipe(wr);
    wr.on("error", function(err) {
        return cb(err);
    });
     wr.on("finish", function() {
        return cb();
    });
});

works in release 20 and older(using complete event); breaks in release 21, finish doesn't seem to trigger, error is fired with->
{ [Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again.] code: 'FILE_NO_UPLOAD', errors: [ null ] }

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions