Comment to 'Bunny.net'
Comment to Bunny.net
  • I don’t think so, but if Bunny.net uses the same S3-based technology, in theory, you can use any CDN. It's an interesting question. This is the first time I hear about Bunny CDN. However based on Backblaze custom CDN recipe: https://unacms.com/cmts-view/y1sgg3?sys=bx_forum&cmt_id=48434

    Here is the customized version for Bunny.net CDN:

     defined('BX_DOL') or die('hack attempt');
    /**
     * Custom storage with private files option disabled
     * @see BxDolStorage
     */
    class BxDolStorageBunnyCDN extends BxDolStorage
    {
        protected function addFileToEngine($sTmpFile, $sLocalId, $sName, $isPrivate, $iProfileId)
        {
            return parent::addFileToEngine($sTmpFile, $sLocalId, $sName, false, $iProfileId);
        }
    }
    

    Configuration Steps:

    1. Save this file as BxDolStorageBunnyCDN.php in the inc/classes folder.
    2. Update the sys_options table to enable selection of the new storage engine:
    UPDATE `sys_options` 
    SET `extra` = 'Local,S3,S3v4,S3v4alt,BunnyCDN' 
    WHERE `name` = 'sys_storage_default';
    

    This will allow Bunny.net CDN to be used as the default storage engine.

    After these steps you will need to configure the cdn to use the storage folder there are several interpretations here. https://unacms.com/wiki/Dev-Storage

    Will it work?

    I don't know, but I think it's worth a try.