upload_file_from_url
Upload a file from a URL to attach it to a specific record in a PocketBase collection, enabling remote file integration with database records.
Instructions
Upload a file from URL to a record in PocketBase
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | The name or ID of the collection | |
fileField | Yes | The name of the file field in the collection schema | |
fileName | No | Optional custom name for the uploaded file. If not provided, will extract from URL | |
recordId | Yes | The ID of the record to attach the file to | |
url | Yes | The URL to download the file from |
Input Schema (JSON Schema)
{
"properties": {
"collection": {
"description": "The name or ID of the collection",
"type": "string"
},
"fileField": {
"description": "The name of the file field in the collection schema",
"type": "string"
},
"fileName": {
"description": "Optional custom name for the uploaded file. If not provided, will extract from URL",
"type": "string"
},
"recordId": {
"description": "The ID of the record to attach the file to",
"type": "string"
},
"url": {
"description": "The URL to download the file from",
"type": "string"
}
},
"required": [
"collection",
"recordId",
"fileField",
"url"
],
"type": "object"
}