A file uploaded to the API.

interface File {
    createTime?: string;
    displayName?: string;
    downloadUri?: string;
    error?: FileStatus;
    expirationTime?: string;
    mimeType?: string;
    name?: string;
    sha256Hash?: string;
    sizeBytes?: number;
    source?: FileSource;
    state?: FileState;
    updateTime?: string;
    uri?: string;
    videoMetadata?: Record<string, unknown>;
}

Properties

createTime?: string

Output only. The timestamp of when the File was created.

displayName?: string

Optional. The human-readable display name for the File. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image'

downloadUri?: string

Output only. The URI of the File, only set for downloadable (generated) files.

error?: FileStatus

Output only. Error status if File processing failed.

expirationTime?: string

Output only. The timestamp of when the File will be deleted. Only set if the File is scheduled to expire.

mimeType?: string

Output only. MIME type of the file.

name?: string

The File resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: files/123-456

sha256Hash?: string

Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format.

sizeBytes?: number

Output only. Size of the file in bytes.

source?: FileSource

Output only. The source of the File.

state?: FileState

Output only. Processing state of the File.

updateTime?: string

Output only. The timestamp of when the File was last updated.

uri?: string

Output only. The URI of the File.

videoMetadata?: Record<string, unknown>

Output only. Metadata for a video.

MMNEPVFCICPMFPCPTTAAATR