IRPCObjectOperations.UploadExistingFiles
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.
| Service | Objects, versions, properties and files MFiles.IRPCObjectOperations |
|---|---|
| gRPC method | /MFiles.IRPCObjectOperations/UploadExistingFiles |
| HTTP (mf-http-grpc) | POST /grpc/v1/upload-existing-files |
| Request | UploadExistingFilesRequest |
| Response | UploadExistingFilesResponse |
| Book and level | Vault API, core |
| Kind | write |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | no |
| Returns metadata structure version | no |
| Streaming | none (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.
| Field | Type | Description |
|---|---|---|
obj_file_vers[] | repeated ObjFileVer | The files to copy, each as object and specific file version. |
obj_file_vers[].obj_id | ObjID | The object that owns the file. |
obj_file_vers[].obj_id.type | int32 | The 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_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
obj_file_vers[].file_ver | FileVer | The specific file version, as in File.file_ver. |
obj_file_vers[].file_ver.file_id | FileID | The file. |
obj_file_vers[].file_ver.type | FileVerType | FILE_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_version | int32 | The file version number. |
obj_file_vers[].file_ver.external_repository_version | string | Used only for files in external repositories. Leave empty. |
obj_file_vers[].file_ver.external_repository_sort_key | int64 | Used only for files in external repositories. Leave 0. |
return_file_refs | bool | True 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.
| Field | Type | Description |
|---|---|---|
upload_ids[] | repeated int32 | An array of temporary file ids. Empty if returnFileRefs was requested. |
file_refs[] | repeated string | If 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. |
Related methods
- UploadTempFile -- Uploads a block of a file to a temporary upload session on the server. The upload can then be used as the content of a new object.
- UploadTempFileCommit -- Completes an upload made with UploadTempFile.
- AddObjectWithFiles -- Creates a new object, optionally with its files, and optionally checks it in.
- RemoveUploadSession -- Removes an upload and its temporary file.