The Upload Layout remote method is a built-in endpoint that lets you upload HTML layout files to a non-production Contensive site using an HTTP POST request. The uploaded file is processed and saved as a layout record.
This method is typically used during development to automate layout deployment from a design tool or build process.
POST to the site URL with the addon route:
POST http://yoursite.com/uploadLayout
| Name | Type | Required | Description |
|---|---|---|---|
| htmlFile | file | Yes | The HTML file to upload. Accepted extensions: .html, .htm, .zip. Maximum size: 100MB. |
| userGuid | string | No | Your user GUID for authentication when not using a browser session. Found on your user record in the admin site. |
curl -X POST http://yoursite.com/uploadLayout -F "htmlFile=@myLayout.html" -F "userGuid={1234-1234-1234-1234}"
The response is JSON with the following structure:
Success:
{
"success": true,
"message": "File processed successfully",
"data": {
"messages": ["list of processing messages"]
}
}
Error:
{
"success": false,
"message": "Error description",
"data": null
}
htmlFile..html, .htm, or .zip extension.Uploads are limited to 10 per user within a 5-minute window. Each upload is logged in the activity log.
The uploaded HTML file is processed using the layout import system (processImportFile). The import reads metadata embedded in the HTML to determine the target layout record. For details on how to format HTML files for import, see the Html Import help file.