This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

[NODE] "TypeError: file.match is not a function" when uploading

Comments

2 comments

  • Avatar
    Welltok Staging

    I'm having the same issue. Did you find any answers?

    0
    Comment actions Permalink
  • Avatar
    Anthony Pothin

    well i didn't remember my that post.

    Today i use cloudinary.uploader.upload_stream function. I had no issue with it. See below how i use it with a buffer.

    class BufferStream extends stream.Readable {
    constructor(buffer, options) {
    super(options || {});
    this.buffer = buffer;
    }
    _read(size) {
    if (this.buffer.length === 0) {
    this.push(null);
    } else {
    this.push(this.buffer.slice(0, size));
    this.buffer = this.buffer.slice(size);
    }
    }
    }

    var stream = new BufferStream(myFileBuffer);
    stream.pipe(cloudinary.uploader.upload_stream(callback));

    0
    Comment actions Permalink

Post is closed for comments.