MCPcopy
hub / github.com/apify/crawlee / FileLike

Interface FileLike

packages/core/src/http_clients/form-data-like.ts:5–27  ·  view source on GitHub ↗

* This is copied from https://github.com/octet-stream/form-data-encoder

Source from the content-addressed store, hash-verified

3 */
4
5interface FileLike {
6 /**
7 * Name of the file referenced by the File object.
8 */
9 readonly name: string;
10 /**
11 * Returns the media type ([`MIME`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)) of the file represented by a `File` object.
12 */
13 readonly type: string;
14 /**
15 * Size of the file parts in bytes
16 */
17 readonly size: number;
18 /**
19 * 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.
20 */
21 readonly lastModified: number;
22 /**
23 * Returns a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) which upon reading returns the data contained within the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
24 */
25 stream(): ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>;
26 readonly [Symbol.toStringTag]?: string;
27}
28
29/**
30 * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.

Callers 3

parseSitemapFunction · 0.65
streamRequestHandlerMethod · 0.65
HttpCrawlerClass · 0.65

Implementers 9

ImpitHttpClientpackages/impit-client/src/index.ts
GotScrapingHttpClientpackages/core/src/http_clients/got-scr
CurlImpersonateHttpClienttest/e2e/cheerio-curl-impersonate-ts/a
CustomHttpClientdocs/guides/custom-http-client/impleme
CustomHttpClientwebsite/versioned_docs/version-3.13/gu
CustomHttpClientwebsite/versioned_docs/version-3.14/gu
CustomHttpClientwebsite/versioned_docs/version-3.15/gu
CustomHttpClientwebsite/versioned_docs/version-3.16/gu
CustomHttpClientwebsite/versioned_docs/version-3.12/gu

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…