Closed NicolasRitouet closed 8 years ago
Not sure I follow this one. There is no loop here, this shouldn't be an issue. Could you provide a repro?
i think this can be closed as dpd-fileupload now inerhits from collection wich should actually fix the E11000 (atleast on my side i can confirm that using the current master of dpd-fileupload fixes the issue)
@andreialecu , @NicolasRitouet
With dpd-fileupload, you can upload many files within the same request. With node > 4.1 it leads to the error
E11000: duplicate key error
The problem is located in this function: https://github.com/deployd/deployd/blob/master/lib/db.js#L288 The variable object on line 293 is not the right one, it's using the latest given in this function due to the different scope. To fix it, we need to pass the right object all the way to theinsert
.