pb_files_upload
Attach files to specific records in a PocketBase collection by uploading Base64 encoded data, specifying the record ID, field name, and file details for storage.
Instructions
Upload a file to a record field
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Collection name or ID | |
| fieldName | Yes | Field name to store the file in | |
| fileData | Yes | Base64 encoded file data | |
| fileName | Yes | Original file name | |
| mimeType | No | File MIME type | |
| recordId | Yes | Record ID to attach the file to |
Input Schema (JSON Schema)
{
"properties": {
"collection": {
"description": "Collection name or ID",
"type": "string"
},
"fieldName": {
"description": "Field name to store the file in",
"type": "string"
},
"fileData": {
"description": "Base64 encoded file data",
"type": "string"
},
"fileName": {
"description": "Original file name",
"type": "string"
},
"mimeType": {
"description": "File MIME type",
"type": "string"
},
"recordId": {
"description": "Record ID to attach the file to",
"type": "string"
}
},
"required": [
"collection",
"recordId",
"fieldName",
"fileData",
"fileName"
],
"type": "object"
}