IRPCDocumentOperationsFileIOInternal.UploadFileCommit2

View as Markdown

Server integration API / specialized internal: not for applications write session or assertion returns metadata structure version

Completes an upload made with UploadFile and stores it as the new content of the file; returns only the data file version.

ServiceDocument file I/O for server components MFiles.IRPCDocumentOperationsFileIOInternal
gRPC method/MFiles.IRPCDocumentOperationsFileIOInternal/UploadFileCommit2
HTTP (mf-http-grpc)POST /grpc/v1/upload-file-commit2
RequestUploadFileCommit2Request
ResponseUploadFileCommit2Response
Book and levelServer integration API, specialized
Kindwrite
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentno
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

For M-Files components only. M-Files Server calls it on another M-Files Server to forward UploadFileCommit. Applications should call UploadFileCommit.

Request: UploadFileCommit2Request

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
upload_idint32The ID from UploadFile.
obj_idObjIDThe object that owns the file.
obj_id.typeint32The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID).
obj_id.item_idItemIDThe ID of the object within its type, in item_id.internal_id.
obj_id.item_id.internal_idint32The ID of the object or value list item.
obj_id.item_id.external_repository_idExternalRepositoryIDUsed only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault.
fileFileThe file and its new size. title, extension and allocation_size are ignored.
file.file_verFileVerThe file and its version. Pass it unchanged in an ObjFileVer to download the file.
file.file_ver.file_idFileIDThe file.
file.file_ver.typeFileVerTypeFILE_VER_TYPE_SPECIFIC for a file version number.Values: FILE_VER_TYPE_UNINITIALIZED (0), FILE_VER_TYPE_LATEST (1), FILE_VER_TYPE_ANY (2), FILE_VER_TYPE_SPECIFIC (3).
file.file_ver.internal_versionint32The file version number.
file.file_ver.external_repository_versionstringUsed only for files in external repositories. Leave empty.
file.file_ver.external_repository_sort_keyint64Used only for files in external repositories. Leave 0.
file.titlestringThe file name without the extension.
file.extensionstringThe file name extension without the dot, for example "pdf".
file.sizeint64The size of the file in bytes. Exact when size_precision is FILE_SIZE_PRECISION_EXACT.
file.size_precisionFileSizePrecisionHow 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).
file.created_at_utcgoogle.protobuf.TimestampThe time in UTC the file was originally created.
file.accessed_at_utcgoogle.protobuf.TimestampThe time in UTC the file was last accessed (e.g. read).
file.written_at_utcgoogle.protobuf.TimestampThe time in UTC the file was last written to.
file.changed_at_utcgoogle.protobuf.TimestampThe time in UTC the file was last written to or its attributes were changed.
file.guidstringGUID of the file.
file.md5_checksumstringThe MD5 checksum of the file as 32 lowercase hexadecimal digits, if available.
file.is_missingboolTrue, if the file is missing.
file.is_content_volatileboolTrue, 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.
file.flagsOBJECTFILEFLAGSObject file flags.
file.flags.allboolSpecifies all flags set; Including any future flags.
file.flags.can_be_edited_externallyboolNext available value.
file.master_storage_file_refstringAn optional File reference (GUID) to external Master Storage API. Only used with Master Storage, otherwise empty.
low_digestint64If not zero, specifies the low-order part of the MD5 checksum of the uploaded file.
high_digestint64If not zero, specifies the high-order part of the MD5 checksum of the uploaded file.

Response: UploadFileCommit2Response

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
data_file_versionint32The version of the stored data file of the new file content.