growsurf_prepare_program_resource_file
Prepares a local file as a FILE program resource by validating file name, MIME type, and base64 bytes, then returns an upload ticket and upload result for creating or updating the resource.
Instructions
Prepare a local file for a FILE Program Resource. Pass the safe file name, matching supported MIME type, and padded base64 bytes (10 MB maximum). GrowSurf requests a one-time ticket and uploads only to the secure HTTPS destination selected by GrowSurf. The result contains only uploadTicket and uploadResult; pass both unchanged to growsurf_create_program_resource or growsurf_update_program_resource. The tool does not accept upload URLs or credentials and never retries an ambiguous upload. This tool is the only source of uploadTicket and uploadResult, and it needs GROWSURF_UPLOAD_ALLOWED_ORIGINS set on the server; without it, FILE resources are unavailable and only LINK and TEXT resources can be created. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | A safe base name with an allowed extension: jpg/jpeg/png/gif/webp/pdf/csv/zip/doc/docx/xls/xlsx/ppt/pptx. | |
| mimeType | Yes | The supported MIME type matching fileName's extension. | |
| campaignId | No | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Pass the `id` returned by growsurf_create_campaign to configure or operate a program you just created, without restarting the server. | |
| fileBase64 | Yes | Canonical padded base64 file bytes only. Do not include a data-URL prefix or whitespace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uploadResult | No | The minimal signed upload confirmation. Pass it unchanged to create/update. | |
| uploadTicket | No | The one-time GrowSurf ticket. Pass it unchanged to create/update. |