How can we avoid storing duplicates in mongo database using grid fs ?
In my code below I directly pipe the request stream to gfs write stream but I cannot check if the file exists or not so duplicate files are being stored in the database . Any idea using this gridfs stream ?
How can we avoid storing duplicates in mongo database using grid fs ?
In my code below I directly pipe the request stream to gfs write stream but I cannot check if the file exists or not so duplicate files are being stored in the database . Any idea using this gridfs stream ?