Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8598249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:06:32+00:00 2026-06-12T01:06:32+00:00

In mongodb GridFS when you insert a file with the same name as an

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:06:33+00:00Added an answer on June 12, 2026 at 1:06 am

    There is no built-in limit on the number of versions, but it may be that a particular driver may set some limit.

    As for getting a specific version, are you by any chance using a specific driver? For instance, I believe pyMongo has a get_version() api which allows you to specify a particular version of the file.

    As for replacing files, if you’re running mongofiles utility in the shell, you can specify -r to replace a document — such as mongofiles -r put file.txt — which would leave you with just this version of file.txt. There may be different implementation with specific drivers.

    Regards,

    Kay

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i use mongodb and save file to gridfs now i want edit images from
Want to find one and modify that to read, write file on mongoDB gridfs
I'm using perl and MongoDB::GridFS (along with other mongo modules) to store and retrieve
I am using the java MongoDB driver for gridfs and would like to use
I've been using perl, MongoDB, and GridFS for some pet development, and wonder -
in MongoDb I can pass a predicate to an queryable instance for example DataBase.GetCollection<BsonDocument>(entity)
Use MongoDB GridFS store images and images stored directly on disk What are the
I have files stored in a MongoDB using GridFS. I need to remove some
I am writing to the MongoDB gridfs using the following code: MongoDB.Driver.GridFS.MongoGridFSCreateOptions createOptions =
mongodb version v1.8.0 on Mac 10.6.8. I'm trying to run a mongoimport on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.