This issue only occurs when the storage type is GridFS and can be resolved by re-creating the index.
For docker installation, use the below commands to create the index:\
-
docker exec -it mongodb mongo\
-
use rocketchat\
-
db.rocketchat_uploads.chunks.createIndex( { files_id: 1, n: 1 }, { unique: true } )