Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

File upload problem using gridfs-stream 0.5.0 #14

@kennyerasmuson

Description

@kennyerasmuson

My code for uploading files was working with gridform until updating Mongoose to v4.x.x. When a file upload is attempted the following error occurs:

/Users/kenny/Dropbox/Dev/vqfolio/node_modules/gridform/node_modules/gridfs-stream/lib/writestream.js:44
this.id = new grid.mongo.BSONPure.ObjectID;
^
TypeError: Cannot read property 'ObjectID' of undefined
at Stream.GridWriteStream (/Users/kenny/Dropbox/Dev/vqfolio/node_modules/gridform/node_modules/gridfs-stream/lib/writestream.js:44:38)

It looks like similar issues have been seen for others using gridfs-stream: aheckmann/gridfs-stream#74

Does the version of gridfs-stream and mongodb that gridform currently use need to be updated to fix this issue? (current versions used by gridform 0.1.7 are gridfs-stream 0.5.0 and mongodb 1.4.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions