In the React Native, this IFileProps structured data can replace the
File class instance in the FormData request.
Just put the URI address of the local file system with the
file's name and type. React Native's FormData implementation
consumes this descriptor; the fetcher does not construct a File instance.
Note that, this IFileProps type works only in the React Native
environment. If you are developing a Web or NodeJS application, you have to
utilize the File class instance directly.
Evidence
contracts/common.md#principled-implementation React Native has no File class, so a file is described by the local URI, the file name, and the content type, which is the shape its FormData implementation accepts.
Evidence
contracts/common.md#clear-and-simple-design A three-field record with no behavior.
Evidence
contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
Evidence
contracts/common.md#meaningful-documentation The comment states the platform limit and each field is documented.
Properties of a file.
In the React Native, this
IFilePropsstructured data can replace theFileclass instance in theFormDatarequest.Just put the URI address of the local file system with the file's name and type. React Native's FormData implementation consumes this descriptor; the fetcher does not construct a File instance.
Note that, this
IFilePropstype works only in the React Native environment. If you are developing a Web or NodeJS application, you have to utilize theFileclass instance directly.Evidence
contracts/common.md#principled-implementation React Native has no
Fileclass, so a file is described by the local URI, the file name, and the content type, which is the shape its FormData implementation accepts.Evidence
contracts/common.md#clear-and-simple-design A three-field record with no behavior.
Evidence
contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
Evidence
contracts/common.md#meaningful-documentation The comment states the platform limit and each field is documented.