ev4 CMS Upload
Description
Section titled “Description”The ev4cms Upload module allows uploading files (images) to the ev4 CMS in base64 format. It reads a local file from the server, converts it to base64 and sends it as a JSON payload to the configured endpoint. It is ideal for automating the upload of product images, banners or other multimedia resources to the ev4 CMS within a workflow.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| url | text | Yes | Upload endpoint URL (supports {{variable}} variables) |
| credentials_id | credentials | No | CMS access credentials |
| sslVerify | boolean | No | Verify SSL certificate (default: false) |
| dataKey | text | No | Data key |
| _typeFiles | text | No | File type for the POST |
| files | array | No | File configuration: array with key (data field containing the path) and name (field name) |
Credentials
Section titled “Credentials”The credential must contain the fields:
username: Username for basic authenticationpassword: Password for basic authentication
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "id": "456", "url": "https://cdn.ejemplo.com/imagen.jpg" }, "_meta_": { "status": 200, "url": "https://miempresa.ev4erp.net/api/upload", "headers": {} }}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "url": "https://miempresa.ev4erp.net/api/cms/upload", "credentials_id": "cred_ev4_01", "files": [ { "key": "local_image_path", "name": "file" } ]}API Used
Section titled “API Used”- ev4 CMS endpoint configured in the
urlfield - Sends a JSON payload with
id,filenameandbase64(data URI)
- Supports dynamic variables
{{variable}}in the URL http://URLs are automatically converted tohttps://- The file is sent as base64 with prefix
data:image/jpeg;base64, - If the file does not exist at the specified path, the module returns an error
- The
filesfield allows configuring the file path from the workflow data - The associated resource
idis taken fromdata.id
Related Nodes
Section titled “Related Nodes”- ev4cms (ev4 content management)
- ev4Client (ev4 ERP data access)