# File

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.File/

A file of an object version: its identity and version, name, size, times and checksum.

- **Full name:** `MFiles.File`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-file_ver"></a>`file_ver` | [`FileVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileVer/index.md) | 1 | The file and its version. Pass it unchanged in an `ObjFileVer` to download the file. |
| <a id="f-title"></a>`title` | `string` | 2 | The file name without the extension. |
| <a id="f-extension"></a>`extension` | `string` | 3 | The file name extension without the dot, for example "pdf". |
| <a id="f-size"></a>`size` | `int64` | 4 | The size of the file in bytes. Exact when `size_precision` is `FILE_SIZE_PRECISION_EXACT`. |
| <a id="f-size_precision"></a>`size_precision` | [`FileSizePrecision`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileSizePrecision/index.md) | 5 | How exact `size` is. Do not rely on `size` if it is `FILE_SIZE_PRECISION_UNKNOWN`. Values: `FILE_SIZE_PRECISION_EXACT` (0), `FILE_SIZE_PRECISION_ESTIMATE` (1), `FILE_SIZE_PRECISION_UNKNOWN` (2). |
| <a id="f-created_at_utc"></a>`created_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 6 | The time in UTC the file was originally created. |
| <a id="f-accessed_at_utc"></a>`accessed_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 7 | The time in UTC the file was last accessed (e.g. read). |
| <a id="f-written_at_utc"></a>`written_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 8 | The time in UTC the file was last written to. |
| <a id="f-changed_at_utc"></a>`changed_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 9 | The time in UTC the file was last written to or its attributes were changed. |
| <a id="f-guid"></a>`guid` | `string` | 10 | GUID of the file. |
| <a id="f-md5_checksum"></a>`md5_checksum` | `string` | 11 | The MD5 checksum of the file as 32 lowercase hexadecimal digits, if available. |
| <a id="f-is_missing"></a>`is_missing` | `bool` | 12 | True, if the file is missing. |
| <a id="f-is_content_volatile"></a>`is_content_volatile` | `bool` | 13 | True, if the file physical content is volatile. I.e. the physical content can change without the version number change, as long as the logical content is same. The file content is guaranteed to stay physically consistent within single download session only. |
| <a id="f-flags"></a>`flags` | [`OBJECTFILEFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJECTFILEFLAGS/index.md) | 14 | Object file flags. |
| <a id="f-master_storage_file_ref"></a>`master_storage_file_ref` | `string` | 15 | An optional File reference (GUID) to external Master Storage API. Only used with Master Storage, otherwise empty. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCDocumentOperationsFileIOInternal.UploadFileCommit2](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/UploadFileCommit2/index.md): Completes an upload made with UploadFile and stores it as the new content of the file; returns only the data file version.
- [IRPCFileTransfer.FileUploadAttach](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/FileUploadAttach/index.md): Stores an ended upload as the new content of an existing file of an object that is checked out to the caller.
- [IRPCObjectOperations.GetFileMalwareInfo](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileMalwareInfo/index.md): Gets the malware scanning verdict of a file, as an advisory hint for a user interface.
- [IRPCObjectOperations.GetObjectFiles](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectFiles/index.md): Gets the files of a specific object version.
- [IRPCObjectOperations.GetObjectFilesForModificationInEventHandler](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectFilesForModificationInEventHandler/index.md): Gets the files of a checked-out object version for modification by an event handler. Used by server-side vault applications; requires the vault-level right to edit and delete all objects.
- [IRPCObjectOperations.UploadFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UploadFile/index.md): Uploads a block of new content for an existing file of an object that is checked out to the caller.
- [IRPCObjectOperations.UploadFileCommit](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UploadFileCommit/index.md): Completes an upload made with UploadFile and stores it as the new content of the file.
- [IRPCSensitivityLabels.GetSensitivityLabels](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSensitivityLabels/GetSensitivityLabels/index.md): Gets the sensitivity labels of one file, or an empty list when no labels are available.

<a id="used-in-fields"></a>

## Used in fields

- [`ObjectVersion.files`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersion/index.md#f-files): The files of this version. Each `file_ver` can be passed to `DownloadFile_Begin`.
- [`ObjVerInfoForMIX.files`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerInfoForMIX/index.md#f-files): Object files.
- [`WOPIContainerFile.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WOPIContainerFile/index.md#f-file): Object file.
- [`UploadFileCommit2Request.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/UploadFileCommit2/index.md#request): The file and its new size. `title`, `extension` and `allocation_size` are ignored.
- [`FileUploadAttachRequest.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/FileUploadAttach/index.md#request): The file to replace, with the `file_ver` of the checked-out version and the exact `size` of the upload.
- [`FileUploadWholeHeader.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileUploadWholeHeader/index.md#f-file): Information about the uploaded file, if attaching immediately.
- [`GetObjectFilesResponse.files`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectFiles/index.md#response): The files of the version, with their IDs, versions, sizes and MD5 checksums.
- [`UploadFileRequest.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UploadFile/index.md#request): The file to replace, as returned for the checked-out version: at least `file_ver`, and the new `size` with `size_precision` `FILE_SIZE_PRECISION_EXACT`.
- [`UploadFileCommitRequest.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UploadFileCommit/index.md#request): The file and its new size. `title` and `extension` are ignored.
- [`GetObjectFilesForModificationInEventHandlerResponse.files`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectFilesForModificationInEventHandler/index.md#response): Results.
- [`GetFileMalwareInfoRequest.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileMalwareInfo/index.md#request): The file to check,. Only pwszMasterStorageFileRef is read.
- [`GetSensitivityLabelsRequest.file`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSensitivityLabels/GetSensitivityLabels/index.md#request): The file to query. Only `master_storage_file_ref` and `extension` are read.
