11. Files & Folders
uploadFileFromUrl(url)
async· returnsBasicFileInfo
Downloads a file from a remote URL and uploads it into the system's media library. Returns { id, fileType }.
Prop
Type
const fileInfo = await context.functions.uploadFileFromUrl(
"https://example.com/product-photo.png"
);
await context.functions.update("products", context.record.ID, { ThumbnailId: fileInfo.id });
Returned value — a BasicFileInfo object with the internal media library ID and detected file type:
{
"id": "9",
"fileType": "image/png"
}