ObjFileSourceUnion
Union for object file source type specific data in ObjFileSource.
Fields
| Field | Type | Number | Description |
|---|---|---|---|
blank_template | ObjFileSourceUnion.BlankTemplateData (oneof data) | 1 | Blank template object file source. |
user_defined_template | ObjFileSourceUnion.UserDefinedTemplateData (oneof data) | 2 | User defined template object file source. |
uploaded_file | ObjFileSourceUnion.UploadedFileData (oneof data) | 3 | Uploaded object file source. |
uploaded_files | ObjFileSourceUnion.UploadedFilesData (oneof data) | 4 | Uploaded object file source with multiple files. |
empty_files | ObjFileSourceUnion.EmptyFilesData (oneof data) | 5 | Empty object file source (one or more files). Only the title and extension of each file are known; there is no upload id or size because the file contents have not been uploaded yet. This type may only be used when the object is created as a draft (the draft flag must be set); otherwise the request is rejected. |
file_content | ObjFileSourceUnion.FileContentData (oneof data) | 6 | Inline file content object file source. |
Used in fields
ObjFileSource.data-- The source data; set the member that matchestype.
Nested message UndefinedSourceData
Undefined object file source.
Full name: MFiles.ObjFileSourceUnion.UndefinedSourceData
No fields.
Nested message BlankTemplateData
Blank template object file source.
Full name: MFiles.ObjFileSourceUnion.BlankTemplateData
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | Blank template file name. |
Nested message UserDefinedTemplateData
User defined template object file source.
Full name: MFiles.ObjFileSourceUnion.UserDefinedTemplateData
| Field | Type | Number | Description |
|---|---|---|---|
obj_id | ObjID | 1 | User defined template object. |
Nested message UploadedFileData
Uploaded object file source.
For a single-file document, the file gets the document's title at check-in; the title given here
is not kept.
Full name: MFiles.ObjFileSourceUnion.UploadedFileData
| Field | Type | Number | Description |
|---|---|---|---|
upload_id | int32 | 1 | The upload session ID from UploadTempFile, committed with UploadTempFileCommit. Zero if file_ref is set. An upload session can be attached to one object only. |
title | string | 2 | The file name without the extension. |
extension | string | 3 | The file extension without the dot, for example pdf. |
size | int64 | 4 | The size of the uploaded content in bytes. |
file_ref | string | 5 | The file_ref of a stateless upload (FileUploadWhole or FileUploadEnd). Empty if upload_id is set. Exactly one of upload_id and file_ref must be set. |
Nested message UploadedFilesData
Uploaded object file source with multiple files.
Full name: MFiles.ObjFileSourceUnion.UploadedFilesData
| Field | Type | Number | Description |
|---|---|---|---|
uploaded_file_array | repeated UploadedFile | 1 |
Nested message EmptyFilesData
Empty object file source (one or more files). Only the title and extension of each file are known; there is no upload id or size because the file contents have not been uploaded yet. This type may only be used when the object is created as a draft (the draft flag must be set); otherwise the request is rejected.
Full name: MFiles.ObjFileSourceUnion.EmptyFilesData
| Field | Type | Number | Description |
|---|---|---|---|
empty_file_array | repeated EmptyFile | 1 |
Nested message FileContentData
Inline file content object file source.
Only for a single-file document (Single file, 22, true) of object type 0 (Document); otherwise the request fails with invalid argument. The content can be at most 10 MiB. Upload larger files first and use an uploaded file source.
Full name: MFiles.ObjFileSourceUnion.FileContentData
| Field | Type | Number | Description |
|---|---|---|---|
title | string | 1 | The file name without the extension. Required. For a single-file document the file gets the document's title at check-in. |
extension | string | 2 | The file extension without the dot, for example txt. |
file_data | bytes | 3 | The file content, at most 10 MiB. May be empty. |