IRPCObjectOperations.DownloadTempFileFromUpload_Begin
Vault API / core read session or assertion idempotent
Opens a download session for a committed upload, to read it back or as a PDF, without creating an object.
| Service | Objects, versions, properties and files MFiles.IRPCObjectOperations |
|---|---|
| gRPC method | /MFiles.IRPCObjectOperations/DownloadTempFileFromUpload_Begin |
| HTTP (mf-http-grpc) | POST /grpc/v1/download-temp-file-from-upload_-begin |
| Request | DownloadTempFileFromUpload_BeginRequest |
| Response | DownloadTempFileFromUpload_BeginResponse |
| Book and level | Vault API, core |
| Kind | read |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | yes |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
Pass the upload_id of an upload committed with
UploadTempFileCommit; an uncommitted
upload fails. Read the content with
DownloadFile_ReadBlock.
FILE_FORMAT_PDF returns a PDF rendition of the upload (for example to preview a document before
it is created); file_extension is then "pdf". The download session ends with the upload.
Request: DownloadTempFileFromUpload_BeginRequest
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_id | int32 | The ID of a committed upload. 0 if file_ref is set. |
file_format | FileFormat | FILE_FORMAT_NATIVE (default) or FILE_FORMAT_PDF.Values: FILE_FORMAT_NATIVE (0), FILE_FORMAT_PDF (1), FILE_FORMAT_DISPLAY_ONLY_PDF (2), FILE_FORMAT_PLAIN_TEXT (3), FILE_FORMAT_MARKDOWN (4). |
file_ref | string | The file_ref of an upload completed with FileUploadEnd, instead of upload_id. Set exactly one of the two. |
extension | string | The file name extension, without the dot. Used only with file_ref. |
Response: DownloadTempFileFromUpload_BeginResponse
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 |
|---|---|---|
download_id | int32 | The download session for DownloadFile_ReadBlock. |
file_size | int64 | The size of the content to download, in bytes. |
file_extension | string | The extension of the content to download; empty if the upload has none. |
Related methods
- UploadTempFileCommit -- Completes an upload made with UploadTempFile.
- DownloadFile_ReadBlock -- Reads a block of a file from a download session.