The method creates a file in the process context.
The method uploads a file from an external source to the process context.
Create a file from the stream in the process context.
Request all associated files.
If a field stores multiple links to files, you can request all of them at once:
const files = await Context.fields.files.fetchAll();
Your review is successfully sent!
Feedback sent successfully
Description of the TFile type field
Hierarchy
Methods
create
The method creates a file in the process context.
Parameters
name: string
body: ArrayBuffer
Returns Promise<FileItem>
createFromLink
The method uploads a file from an external source to the process context.
Parameters
name: string
url: string
Returns Promise<FileItem>
createFromStream
Create a file from the stream in the process context.
Parameters
name: string
stream: ReadableStream
Returns Promise<FileItem>
fetchAll
Request all associated files.
If a field stores multiple links to files, you can request all of them at once:
const files = await Context.fields.files.fetchAll();Returns Promise<FileItem[]>