Inserting file in mongodb using Python

You can also store small binary files (need to be smaller than 16mb) inside of the bin data type within your MongoDB documents.

For text files I’d recommend parsing into a proper MongoDB document so you can query on the data. You could also look at Atlas Data Lake for querying data in text within S3

2 Likes