Open fajarsuhendra opened 9 years ago
See #588
I try the gridfs 0.0.31 but it still did not work (maybe I implemented it wrong)
Now, I use the gridfs 0.0.27 and it works. I think I will stick into it for while
Thanks aaronjudd
This shouldn't be closed.
I've got filesystem & gridfs both, and originally moved OFF gridfs to filesystem to get to the bottom of this same problem (zero kb files after upload. Now it appears that it's CollectionFS related, rather than storage adaptor?
(aka, about the specific version of gridfs, i've already been through hell and back with 0.33 being the only one that works in production...I have files now and i see files with 0kb, so unless it's a temporary store issue (gridfs still?) the issue transcends the particular storage adapter.
I know this package is deprecated, but keeping issues like this open is crucial for forensic analysis etc.
Now, how to get OFF CollectionFS now that my entire app is based around the api of accessing files as collection documents lol
so, what I am experiencing: to be clear: an image appears to upload ok, but actually it's not ok, when everything worked prior and no versions had been changed since gridfs 0.33 problem appeared after about 2000 images of about 150kb uploaded, went from intermittent to rather constant with gridfs. about a week back, I added cfs:filesystem adapter and mounted (via S3FS) a Minio (open source S3 clone) to a local folder and added a method for an admin function to pipe the readstream to the writestream, with both storage adapters backing each Collection, as an array. This worked fine, and I managed to completely export all images to files and things work fine.
Except that this issue appeared again suddenly...
upload looks ok: a search of the cardImages.filerecord collection shows:
{ "cardImages-fs": { "name": "B83_inside copy.jpg", "type": "image/jpeg", "size": 210413, "key": "cardImages-GL2gFoLePPnNnhCZG-B83_inside copy.jpg", "updatedAt": "2017-06-25T21:02:55.388Z", "createdAt": "2017-06-25T21:02:55.388Z" }, "cardImages": { "name": "B83_inside copy.jpg", "type": "image/jpeg", "size": 210413, "key": "595024ffb33c1129369684b3", "updatedAt": "2017-06-25T21:02:55.456Z", "createdAt": "2017-06-25T21:02:55.456Z" } }
that's ok, like 200k... correct. previously, the error was that the cardImages.files entry would have a size of 0kb and there would literally be NO chunk files with the associated key. Now, with cfs:filesystem storage adapter, the cardImages.files entry shows the correct size, but i see an empty image file:
-rw-r--r-- 1 someone somegroup 0 Jun 25 21:02 cardImages-GL2gFoLePPnNnhCZG-B83_inside copy.jpg
so, I'm trying to figure out what happens in between and where the ball gets dropped...
I just install collectionFS and follow the tutorial to get the feels of collectionFS. I can upload the file, return the
_id
, but theurl
doesn't show up. When I check the console, everytime I start hitting submit button, and carefully watch the terminal, this guy show upI can see that the file is uploaded, but the size is 0. Two storage adapter got the same error as above, they are filesystem and gridfs. Did I do it wrong? or this is an ongoing process