Saltar al contendio prinicipal

File Data Model

Advertencia

Esta página aún no se encuentra traducida al español.

COTFile

Description

Uploaded files are categorized into three content types: images, videos, and documents.

JSON Sample

Sample of an uploaded file.

{
"_id": "61b243bdc8f27b93e2cd12ef",
"status": "uploaded",
"public": false,
"company": "61b24350d5474205a39f9e66",
"context": {
"avatar": false,
"_id": "61b2435a5cbc0fa23c98e464",
"channel": "61b243637ade123500e73f06",
"group": "61b2436808be63e2facd087f"
},
"size": 529644,
"fileName": "SQL Data Model _ Cotalker Technical Documentation.pdf",
"mimeType": "application/pdf",
"key": "acme_inc/document/v4_61b243bdc8f27b93e2cd12ef/default/sql-data-model-partner-technical-consultants-d.pdf",
"extension": ".pdf",
"contentType": "document",
"user": "61b243b010de5e3a7a37d540",
"createdAt": "2021-06-12T16:22:41.022Z",
"modifiedAt": "2021-06-12T16:22:41.161Z",
"__v": 0,
"data": null,
"totalSize": 529644,
"url": "https://cotalker-us-files.s3.amazonaws.com/acme_inc/document/v4_61b243bdc8f27b93e2cd12ef/default/sql-data-model-partner-technical-consultants-d.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ27XMZVIFCIAPLHA%2F20211209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211209T175044Z&X-Amz-Expires=900&X-Amz-Signature=725e080587bea916dd5b1829c309cd572165083525d28f32555dd9a1d818d9e4&X-Amz-SignedHeaders=host&response-content-disposition=inline%3B%20filename%3D"
}

Fields

FieldDescriptionTypeNotes
companyThe ObjectId of the company where the file is stored.ObjectId<COTCompany>
contentTypeIndicates the category the file belongs to.string Options are: image, video, document
contextHolds information about the file's contexts, i.e., the related data models.objectThe object fields vary depending on the file.
createdAtDate and time the file was uploaded.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
dataAdds screenshot information in "video" files and thumbnail data in "image" files.object
extensionIndicates the file's format extension.string
fileNameIndicates the file's name and extension.string
keyIndicates the relative path of the file.stringThe key is needed to get the signed file URL.
mimeTypeIndicates the file's type and format, e.g., image/jpeg, video/mp4, application/pdf.stringClick here for more details about content types.
modifiedAt The last time the file was modified.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
publicEnables the file to be viewed or shared outside channels.booleanMust be set to true for images used for branding.
sizeIndicates the original byte size of the file.number
statusIndicates the file's current status on the server.stringPossible answers: pending, processing, uploaded, deleted, error
totalSizeIndicates the file's byte size after compression.number
userUser that sent the file.ObjectId<COTUser>DEPRECATED
urlThe file's URL with signature included.stringNot present in the response given when a file is just uploaded.

Deprecated

FieldDescriptionTypeNotes
debug objectDEPRECATED

Additional Resources