In mongodb GridFS when you insert a file with the same name as an already existing file the old file becomes a previous version of the new file.
I'm wondering can I do this multiple times and is there a limit?
For example, I have a file file.txt
, then I insert another file.txt
, now I have two versions of file.txt
. I now insert a third file.txt
. Do I now have three versions of the file? Or just two? How many more times can I insert file.txt
and keep all the previous versions?
Finally, how do I access these previous versions or overwrite them?