Skip to main content

FileWithMetadata

@nuclia/core


@nuclia/core / FileWithMetadata

Interface: FileWithMetadata

Defined in: libs/sdk-core/src/lib/db/upload.ts:56

Extends​

  • File

Properties​

contentType?​

optional contentType?: string

Defined in: libs/sdk-core/src/lib/db/upload.ts:60


lang?​

optional lang?: string

Defined in: libs/sdk-core/src/lib/db/upload.ts:57


lastModified​

readonly lastModified: number

Defined in: node_modules/typescript/lib/lib.dom.d.ts:14425

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). Files without a known last modified date return the current date.

MDN Reference

Inherited from​

File.lastModified


md5?​

optional md5?: string

Defined in: libs/sdk-core/src/lib/db/upload.ts:58


name​

readonly name: string

Defined in: node_modules/typescript/lib/lib.dom.d.ts:14431

The name read-only property of the File interface returns the name of the file represented by a File object. For security reasons, the path is excluded from this property.

MDN Reference

Inherited from​

File.name


payload?​

optional payload?: ICreateResource

Defined in: libs/sdk-core/src/lib/db/upload.ts:59


processing?​

optional processing?: string

Defined in: libs/sdk-core/src/lib/db/upload.ts:61


size​

readonly size: number

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5044

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

MDN Reference

Inherited from​

File.size


split?​

optional split?: string

Defined in: libs/sdk-core/src/lib/db/upload.ts:62


type​

readonly type: string

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5050

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

MDN Reference

Inherited from​

File.type


webkitRelativePath​

readonly webkitRelativePath: string

Defined in: node_modules/typescript/lib/lib.dom.d.ts:14437

The webkitRelativePath read-only property of the File interface contains a string which specifies the file's path relative to the directory selected by the user in an element with its webkitdirectory attribute set.

MDN Reference

Inherited from​

File.webkitRelativePath

Methods​

arrayBuffer()​

arrayBuffer(): Promise<ArrayBuffer>

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5056

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

Returns​

Promise<ArrayBuffer>

Inherited from​

File.arrayBuffer


bytes()​

bytes(): Promise<Uint8Array<ArrayBuffer>>

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5062

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

Returns​

Promise<Uint8Array<ArrayBuffer>>

Inherited from​

File.bytes


slice()​

slice(start?, end?, contentType?): Blob

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5068

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

Parameters​

start?​

number

end?​

number

contentType?​

string

Returns​

Blob

Inherited from​

File.slice


stream()​

stream(): ReadableStream<Uint8Array<ArrayBuffer>>

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5074

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

MDN Reference

Returns​

ReadableStream<Uint8Array<ArrayBuffer>>

Inherited from​

File.stream


text()​

text(): Promise<string>

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5080

The text() method of the Blob interface returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8.

MDN Reference

Returns​

Promise<string>

Inherited from​

File.text