If you want to integrate storage other than Amazon S3 with Unlayer, you can do so by using the custom file storage option. To handle image uploads to your own storage, you need to register a callback function with Unlayer. Here's how you can do it:
β
1. Register a callback function for the 'image' event using the unlayer.registerCallbackmethod.
2. Within this callback function, handle the file upload to your storage system.
3. Once the file is uploaded, call the done function with the URL of the uploaded image.
Here is a JavaScript example of how you might implement the callback:
unlayer.registerCallback('image', function(file, done) { // Handle file upload here // After uploading, call the done function with the URL of the uploaded image done({ url: 'https://your-storage-url.com/path/to/image.jpg' }); });By following these steps, you can integrate your own storage system to store images or files uploaded through the Unlayer editor. It's important to note that this approach requires you to handle the file upload process yourself, as opposed to the built-in support for Amazon S3 which requires no coding.
Sources
β
