Import not working without any log
Hi,
I'm trying to import a json file with some documents but mongo-express (0.54.0) not showing any error message and not getting any error log. The only message that we are getting is:
mongo-express_1 | POST /db/xxx/import/xxx 400 7.238 ms - 8
And the data that I'm trying to add is like:
{"_id":{"$oid":"xxx"},"acc":{"$oid":"xxx"},"user":{"$oid":"xxx"},"origin":"invoice#xxx","bridge":"contact#xxx","group":{"$oid":"xxx"},"type":"invoice","en":1,"line":1,"account":xxx,"debit":1.01,"credit":0.0,"desc":"xxx","docdesc":"xxx","tmp":1615330800,"tags":[],"notes":"","files":[],"contact":{"$oid":"xxx"},"cname":"c","year":2021,"date":{"$date":"2021-03-09T23:00:00Z"}} {"_id":{"$oid":"yyy"},"acc":{"$oid":"yyy"},"user":{"$oid":"yyy"},"origin":"invoice#yyy","bridge":"aa#yyy","group":{"$oid":"yyy"},"type":"invoice","en":1,"line":2,"account":1234567890,"debit":0.0,"credit":1.0,"desc":"yyy","docdesc":"yyy","tmp":1615330800,"tags":[""],"notes":"","files":[],"contact":{"$oid":"yyy"},"cname":"c","year":2021,"date":{"$date":"2021-03-09T23:00:00Z"}}
Are you planning to fix this?
Thanks in advance
Just have the same issue with the lastest version. I exported with mongo express the db in json format but import dont work. Just have in console an error 400 for the post request
Any update of that?
Thanks in advance.
same here POST /db/itquiz/import/constants 400 9.385 ms - 8
Happened on mongo:5.0.9-focal / mongo-express;latest
Only fix is to use :
mongoimport --authenticationDatabase admin --username [username] --password [password]--db [dbName]--collection [collectionName]--file [collectionName.json]
This should be fixed with #996 (mongo-express v1.0.1-rc).