Юниверс DG SDK UI
v2.15.0

Интерфейс RcFile

Интерфейс описывающий файл

interface RcFile {
    lastModified: number;
    lastModifiedDate: Date;
    name: string;
    size: number;
    type: string;
    uid: string;
    webkitRelativePath: string;
    arrayBuffer(): Promise<ArrayBuffer>;
    bytes(): Promise<Uint8Array<ArrayBuffer>>;
    slice(start?: number, end?: number, contentType?: string): Blob;
    stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
    text(): Promise<string>;
}

Иерархия

  • File
    • RcFile
Индекс

Свойства

lastModified: number

The lastModified read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).

MDN Reference

lastModifiedDate: Date

Дата последнего изменения, только для чтения.

name: string

The name read-only property of the File interface returns the name of the file represented by a File object.

MDN Reference

size: number

The size read-only property of the Blob interface returns the size of the Blob or File in bytes.

MDN Reference

type: string

The type read-only property of the Blob interface returns the MIME type of the file.

MDN Reference

uid: string

Уникальный идентификатор загрузки.

webkitRelativePath: string

Относительный путь к файлу внутри каталога, только для чтения.

Методы

  • The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.

    MDN Reference

    Возвращает Promise<ArrayBuffer>

  • The bytes() method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.

    MDN Reference

    Возвращает Promise<Uint8Array<ArrayBuffer>>

  • The slice() method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.

    MDN Reference

    Параметры

    • Optionalstart: number
    • Optionalend: number
    • OptionalcontentType: string

    Возвращает Blob

  • The stream() method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.

    MDN Reference

    Возвращает ReadableStream<Uint8Array<ArrayBuffer>>

  • The text() method of the string containing the contents of the blob, interpreted as UTF-8.

    MDN Reference

    Возвращает Promise<string>