·
Added a discussion

Has anyone configured media offload for storage, stream, cdn with Bunny.net? Will it even work with una storage engine?

Thanks.

  • 1112
Comments
    • 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.

      • Thanks for the reply @Romulus. No, bunny storage is not yet S3 compatible which is frustrating. This article explains it. Bunny.net/blog/whats-happening-with-s3-compatibility

        However, they have partnered with Backblaze to optimize all media and serve it via Bunny's CDN. Bunny is super cheap and super fast. We have used them with Wordpress sites for years. If you are allowing large media files then Bunny is the #1 choice. Their steam transcoding and player are awesome. Bunny.net/stream

        We haven't really looked into any other S3 storage yet as it has never been an issue and always so expensive compared to Bunny but I guess we will have to go with Backblaze for the time being.

        We will look at that code and see what we can manage. Thanks for the help.

        • Backblaze is already very affordable, but there are many CDN options available. Ultimately, the choice depends on each company's preferences. However, the most important factors are coverage in the target region or globally, as well as data security. Of course, price also plays a crucial role in any business, along with compatibility with the application.

          Login or Join to comment.