IRPCObjectOperations.UploadExistingFiles

View as Markdown

Vault API / core write session or assertion

Copies existing file versions into new uploads, for example to create a new object with a copy of a file.

ServiceObjects, versions, properties and files MFiles.IRPCObjectOperations
gRPC method/MFiles.IRPCObjectOperations/UploadExistingFiles
HTTP (mf-http-grpc)POST /grpc/v1/upload-existing-files
RequestUploadExistingFilesRequest
ResponseUploadExistingFilesResponse
Book and levelVault API, core
Kindwrite
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentno
Returns metadata structure versionno
Streamingnone (unary)

Remarks

Each copy is an upload like one made with UploadTempFile and UploadTempFileCommit, so it can be passed to AddObjectWithFiles. Remove the copies you do not use with RemoveUploadSession.

Request: UploadExistingFilesRequest

Request details for creating temporary file uploads from existing files.

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

FieldTypeDescription
obj_file_vers[]repeated ObjFileVerThe files to copy, each as object and specific file version.
obj_file_vers[].obj_idObjIDThe object that owns the file.
obj_file_vers[].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_file_vers[].obj_id.item_idItemIDThe ID of the object within its type, in item_id.internal_id.
obj_file_vers[].file_verFileVerThe specific file version, as in File.file_ver.
obj_file_vers[].file_ver.file_idFileIDThe file.
obj_file_vers[].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).
obj_file_vers[].file_ver.internal_versionint32The file version number.
obj_file_vers[].file_ver.external_repository_versionstringUsed only for files in external repositories. Leave empty.
obj_file_vers[].file_ver.external_repository_sort_keyint64Used only for files in external repositories. Leave 0.
return_file_refsboolTrue to get the copies in file_refs instead of upload_ids. In a vault without stateless uploads they are the upload IDs as decimal strings.

Response: UploadExistingFilesResponse

Response with temporary file upload ids created from existing files.

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

FieldTypeDescription
upload_ids[]repeated int32An array of temporary file ids. Empty if returnFileRefs was requested.
file_refs[]repeated stringIf returnFileRefs was requested, the copies in the order of the requested files: file_refs of stateless uploads if the vault supports them, otherwise the upload IDs in decimal.