docs/build-pieces/piece-reference/files.mdx
The ctx.files object allow you to store files in local storage or in a remote storage depending on the run environment.
You can use the write method to write a file to the storage, It returns a string that can be used in other actions or triggers properties to reference the file.
Example:
const fileReference = await files.write({
fileName: 'file.txt',
data: Buffer.from('text')
});
For Reading the file If you are using the file property in a trigger or action, It will be automatically parsed and you can use it directly, please refer to Property.File in the properties section.