User007
User007

Reputation: 1559

Does MongoDB's GridFS has minimum file size requirement?

Sometimes I generated empty files (size = 0 on Linux) but they are necessary to insert into the MongoDB file storage.

I use Django's models.FileField, but I want to rule that out because it was accepted I think (really can't be too sure), and sent off to insert to MongoDB. Any idea if it has the minimum file size?

Upvotes: 0

Views: 372

Answers (1)

Stennie
Stennie

Reputation: 65323

There is no minimum file size for GridFS .. this is easy to test with the mongofiles command line utility:

$ touch foo
$ mongofiles put foo
connected to: 127.0.0.1
added file: { _id: ObjectId('501385ebf51e4d7d24554d5b'), filename: "foo", chunkSize: 262144, uploadDate: new Date(1343456747050), md5: "d41d8cd98f00b204e9800998ecf8427e", length: 0 }
done!
$ mongofiles list
connected to: 127.0.0.1
foo 0

Upvotes: 1

Related Questions