Skip to content

Self-hosted Storage

This feature is available with the Plugin for Business plan and higher.

If you're on the Plugin for Startup or Plugin Expansion plan, consider upgrading to access this feature. For more details, visit our pricing page or contact support.

If our integrated storage providers (Google Cloud Storage, Amazon S3, Cloudfront R2) don't meet your specific requirements, you can integrate your own self-hosted storage using a flexible set of API endpoints.

This setup allows you to retain full control over asset management — while still using our built-in File Manager for uploading, organizing, and retrieving images within the editor interface.

WARNING

Before implementing the endpoints, check how to work with API endpoints.

How It Works

By defining a set of custom backend endpoints, you can connect our File Manager UI directly to your infrastructure for:

  • Listing files and folders
  • Uploading images
  • Creating new folders
  • Deleting files or folders
  • Saving edited images from the built-in image editor

All API responses must follow the expected structure to work correctly within the editor.

API Endpoints

Used when File Manager opens. This call is used for retrieving files and folders.

  • URL: /{API.FOLDERS}
  • Method: GET
  • Params: path, userId, uuid
  • Content-Type: application/json

Response example:

json
[
  {
    "name": "filename.jpg",
    "date": "2024-12-01T14:23:00Z", // last-date-modified
    "size": 512000,
    "path": "/path/", // current directory path
    "type": "file", // "file" | "folder"
    "extension": ".jpg",
    "url": "https://url-to-image.com/image.jpeg"
},
{
    "name": "holiday-images",
    "path": "/",
    "type": "folder"
  }
]

Used when user adds a new folder in the File Manager.

  • URL: /{API.FOLDERS}
  • Method: POST
  • Content-Type: application/json

Body:

json
{
  "name": "new-folder",
  "path": "/"
}

Response:

json
[
  {
    "url": "https://your-domain.com/images/new-folder/",
  }
]

Used when user deletes selected images or folders. We automatically append /delete to the FOLDERS API path.

  • URL: /{API.FOLDERS}/delete
  • Method: POST
  • Content-Type: application/json

Body:

json
[
  {
    "name": "filename.jpg",
    "type": "file",
    "path": "/"
  },
  {
    "name": "old-folder",
    "type": "folder",
    "path": "/",
    "key": null
  }
]

Response:

HTTP 200 or 204 on success (no body required).

Used when user uploads a file via File Manager or when user drops an image onto an image block.

  • URL: /{API.IMAGE_UPLOAD}
  • Method: POST
  • Content-Type: application/json

Body:

json
{
  "image": "(binary)", // // actual binary image content
  "path": "/",
  "uuid": "username"
}

Response:

json
{
  "success": true,
  "url": "https://your-domain.com/images/uploaded-image.jpg"
}

Used when user saves an image from the integrated image editor.

  • URL: /{API.IMAGE_EDITOR_UPLOAD}
  • Method: POST
  • Content-Type: application/json

Request:

json
{
  "content": "data:image/png;base64,...", // base64 encoded image
  "filename": "edited-image.png"
}

Response:

json
{
  "url": "https://your-domain.com/images/edited-image.png"
}