Platforms to show: All Mac Windows Linux Cross-Platform

Back to MongoGridFSFileMBS class.

MongoGridFSFileMBS.Aliases as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches or sets the aliases associated with a gridfs file.

You need to call Save() to persist this change.
(Read and Write property)

MongoGridFSFileMBS.ChunkSize as Int32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches the chunk size used with the underlying gridfs file.

(Read only property)

MongoGridFSFileMBS.ContentType as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches the content type specified for the underlying file.

Sets the content type for the gridfs file. This should be something like "text/plain".
You need to call Save() to persist this change.
(Read and Write property)

MongoGridFSFileMBS.FileName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches or sets the filename for the given gridfs file.

(Read and Write property)

MongoGridFSFileMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal object reference.

(Read only property)

MongoGridFSFileMBS.ID as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches or sets the id of a gridfs file.

The C Driver always uses an ObjectId for _id, but files created by other drivers may have any type of _id.

Sets the id of file to any BSON type.
(Read and Write property)

MongoGridFSFileMBS.Length as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches the length of the gridfs file in bytes.

(Read only property)

MongoGridFSFileMBS.MD5 as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches or sets the pre-computed MD5 for the underlying gridfs file.

You need to call Save() to persist this change.
(Read and Write property)

MongoGridFSFileMBS.Metadata as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches or sets a bson document containing the metadata for the gridfs file.

Sets the metadata associated with file.
You need to call Save() to persist this change.
(Read and Write property)

MongoGridFSFileMBS.Position as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets or sets the current position indicator within file.

Setting the position will seek within the file.
(Read and Write property)

MongoGridFSFileMBS.UploadDate as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Fetches the specified upload date of the gridfs file in milliseconds since the UNIX epoch.
Example
Var GridFS As MongoGridFSMBS = Client.GridFS("test", "fs")
Var file As MongoGridFSFileMBS = GridFS.FindOneByFileName( "test.txt")

Var d As New date(1970,1,1,0,0,0)
d.TotalSeconds = d.TotalSeconds + file.UploadDate / 1000.0

MessageBox d.SQLDateTime

(Read only property)

Some examples using this property:

The items on this page are in the following plugins: MBS MongoDB Plugin.


The biggest plugin in space...