fix issue 1777:MongoDB: upload representation error, thanks Francisco Betancourt