Error adding File

Hello,

I`m getting an error when trying to upload a file to build an automate upgrade task.

Does anyone know how to solve this problem?

What version of MongoDB are you using?

The mongodb version are 4.0.1

Did you upgrade from an older version by any chance?

Yea, I did it, but was before trying to use the file menu.
Should I rollback that? Is there any suggestion?

Try creating the following indexes in MongoDB:

db.fs.chunks.createIndex( { files_id: 1, n: 1 }, { unique: true } );
db.fs.files.createIndex( { filename: 1, uploadDate: 1 } );
1 Like

That solved the problem, thank you!