ObjFileSourceUnion

View as Markdown

Union for object file source type specific data in ObjFileSource.

Fields

FieldTypeNumberDescription
blank_templateObjFileSourceUnion.BlankTemplateData (oneof data)1Blank template object file source.
user_defined_templateObjFileSourceUnion.UserDefinedTemplateData (oneof data)2User defined template object file source.
uploaded_fileObjFileSourceUnion.UploadedFileData (oneof data)3Uploaded object file source.
uploaded_filesObjFileSourceUnion.UploadedFilesData (oneof data)4Uploaded object file source with multiple files.
empty_filesObjFileSourceUnion.EmptyFilesData (oneof data)5Empty 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_contentObjFileSourceUnion.FileContentData (oneof data)6Inline file content object file source.

Used in fields

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

FieldTypeNumberDescription
namestring1Blank template file name.

Nested message UserDefinedTemplateData

User defined template object file source.

Full name: MFiles.ObjFileSourceUnion.UserDefinedTemplateData

FieldTypeNumberDescription
obj_idObjID1User 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

FieldTypeNumberDescription
upload_idint321The upload session ID from UploadTempFile, committed with UploadTempFileCommit. Zero if file_ref is set. An upload session can be attached to one object only.
titlestring2The file name without the extension.
extensionstring3The file extension without the dot, for example pdf.
sizeint644The size of the uploaded content in bytes.
file_refstring5The 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

FieldTypeNumberDescription
uploaded_file_arrayrepeated UploadedFile1

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

FieldTypeNumberDescription
empty_file_arrayrepeated EmptyFile1

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

FieldTypeNumberDescription
titlestring1The file name without the extension. Required. For a single-file document the file gets the document's title at check-in.
extensionstring2The file extension without the dot, for example txt.
file_databytes3The file content, at most 10 MiB. May be empty.