[bd] Attachment Store for XenForo 2.0 [Paid] 2.1.3

Store attachment differently and more effectively.

  1. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Alien, David, alfa1 and 1 other person like this.
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    pete likes this.
  3. kappadox

    kappadox New Member

    This plugin is awesome. I used xf1.... Can it be used for xf 2.0.1 or xf 2.0.2.
     
  4. kappadox

    kappadox New Member

    Where is the road we show in the picture... I could not run the plugin.

    ayar.png
     
  5. Nesdam1981

    Nesdam1981 New Member

    EU Paris is missing from region.
     
  6. rsi

    rsi New Member

    Hi, will this update work with the new version of Resources? I've heard it's a problem with the Media Gallery, but what about the Resources add-on?
    .
     
  7. rsi

    rsi New Member

    Ok, I tried Attachment Store v2.0.2 last night on my test install with XF v2.0.4 and RM v2.0.2 and it works.
    .
     
  8. rsi

    rsi New Member

    #8 rsi, Mar 20, 2018
    Last edited: Mar 20, 2018
    I did verify what others have said and there is a problem with the XFMG v2.0.3

    P.S. I'm using Attachment Store in ftp mode.

    Code:
    League\Flysystem\FileNotFoundException: File not found at path: 2018/03/21_1.jpg src/vendor/league/flysystem/src/Filesystem.php:385
    
    Stack trace
    
    #0 src/vendor/league/flysystem/src/Filesystem.php(193): League\Flysystem\Filesystem->assertPresent('2018/03/21_1.jp...')
    #1 [internal function]: League\Flysystem\Filesystem->readStream('2018/03/21_1.jp...', Array)
    #2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('parent::readStr...', Array)
    #3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('readStream', Array)
    #4 src/addons/Xfrocks/AttachmentStore/Fs.php(29): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array)
    #5 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): Xfrocks\AttachmentStore\Fs->delegateMethodCall('readStream', Array)
    #6 [internal function]: League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('2018/03/21_1.jp...')
    #7 src/vendor/league/flysystem/src/MountManager.php(269): call_user_func_array(Array, Array)
    #8 src/vendor/league/flysystem/src/MountManager.php(179): League\Flysystem\MountManager->invokePluginOnFilesystem('readStream', Array, 'Xfrocks-Attachm...')
    #9 src/XF/Util/File.php(91): League\Flysystem\MountManager->__call('readStream', Array)
    #10 src/addons/XFMG/Service/Media/ThumbnailGenerator.php(17): XF\Util\File::copyAbstractedPathToTempFile('Xfrocks-Attachm...')
    #11 src/addons/XFMG/Service/Media/TempCreator.php(107): XFMG\Service\Media\ThumbnailGenerator->createTempThumbnailFromAttachment(Object(XF\Entity\Attachment), 'data://xfmg/tem...', 'image')
    #12 src/XF/Service/ValidateAndSavableTrait.php(40): XFMG\Service\Media\TempCreator->_save()
    #13 src/addons/XFMG/Attachment/Media.php(140): XFMG\Service\Media\TempCreator->save()
    #14 src/XF/Service/Attachment/Preparer.php(225): XFMG\Attachment\Media->onNewAttachment(Object(XF\Entity\Attachment), Object(XF\FileWrapper))
    #15 src/XF/Service/Attachment/Preparer.php(17): XF\Service\Attachment\Preparer->insertTemporaryAttachment(Object(XFMG\Attachment\Media), Object(Xfrocks\AttachmentStore\XF\Entity\AttachmentData), '219c36ee47caa6a...', Object(XF\FileWrapper))
    #16 src/XF/Attachment/Manipulator.php(170): XF\Service\Attachment\Preparer->insertAttachment(Object(XFMG\Attachment\Media), Object(XF\FileWrapper), Object(XFMG\XF\Entity\User), '219c36ee47caa6a...')
    #17 src/XF/Pub/Controller/Attachment.php(86): XF\Attachment\Manipulator->insertAttachmentFromUpload(Object(XF\Http\Upload), NULL)
    #18 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Attachment->actionUpload(Object(XF\Mvc\ParameterBag))
    #19 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', 'json', Object(XF\Mvc\ParameterBag), '', Object(Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment), NULL)
    #20 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
    #21 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
    #22 src/XF.php(328): XF\App->run()
    #23 index.php(13): XF::runApp('XF\\Pub\\App')
    #24 {main}
    
    Request state
    
    array(4) {
      ["url"] => string(111) "/_xf2/index.php?attachments/upload&type=xfmg_media&context[category_id]=1&hash=219c36ee47caa6a884c1da6f725d71b2"
      ["referrer"] => string(80) "https://mydomain.net/_xf2/index.php?media/categories/example-category.1/add"
      ["_GET"] => array(4) {
        ["attachments/upload"] => string(0) ""
        ["type"] => string(10) "xfmg_media"
        ["context"] => array(1) {
          ["category_id"] => string(1) "1"
        }
        ["hash"] => string(32) "219c36ee47caa6a884c1da6f725d71b2"
      }
      ["_POST"] => array(11) {
        ["_xfToken"] => string(8) "********"
        ["_xfResponseType"] => string(4) "json"
        ["_xfWithData"] => string(1) "1"
        ["flowChunkNumber"] => string(1) "1"
        ["flowChunkSize"] => string(10) "4294967296"
        ["flowCurrentChunkSize"] => string(5) "15229"
        ["flowTotalSize"] => string(5) "15229"
        ["flowIdentifier"] => string(10) "15229-1jpg"
        ["flowFilename"] => string(5) "1.jpg"
        ["flowRelativePath"] => string(5) "1.jpg"
        ["flowTotalChunks"] => string(1) "1"
      }
    }
    .
     
    megabosx likes this.
    1. megabosx

      megabosx New Member

      megabosx @rsi Experiencing the same problem,
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @rsi We are coming back to check on this and it seems to work fine. How is it going on your site?
       
  9. alfa1

    alfa1 Active Member

  10. alfa1

    alfa1 Active Member

    Does the XF1 version also support spaces?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @alfa1 I believe it does, configuration is the same. I haven't tested XF1 version though.
       
      alfa1 likes this.
      1
  11. trangchongcheng

    trangchongcheng New Member

    Attached Files:

    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @trangchongcheng Tức là sau khi chọn file thì XenForo không báo lỗi gì, chèn vô bài được nhưng không hiện hình đúng không bạn? Biểu hiện này cho thấy XenForo đã upload lên S3 thành công (như trong hình bạn check trong S3 console thấy files) tuy nhiên cái URL generate ra chưa đúng nên không hiện ảnh.

      Mình để ý thấy bucket của bạn để là subdomain và đã cấu hình CNAME rồi? Bạn thử upload files và post bài bình thường rồi copy cái link attachment để kiểm tra thêm nhé.
       
    2. trangchongcheng

      trangchongcheng New Member

      #16 trangchongcheng, May 9, 2018
      Last edited: May 9, 2018
      trangchongcheng @xfrocks Tình hình là do tên miền chính em cũng bât CDN nên lỗi thì phải, giờ thị hết rồi không biết phải do nguyên nhân này ko ạ?

      Với cái tools convert tất cả ảnh ở local sang s3 ở đâu , sao em không tìm ko thấy nó a?
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @trangchongcheng Mình mới đăng ký và upload thử thì thấy khá nhanh. Server bạn đang đặt ở đâu? Nếu ở Việt Nam thì nên đặt bucket ở Singapore để tránh lỗi mạng khi kết nối từ trong nước ra quốc tế nhé. Còn để nhanh hơn nữa bạn có thể làm cái server FTP ở trong nước luôn.
       
    4. trangchongcheng

      trangchongcheng New Member

      trangchongcheng @xfrocks Em dùng ở Việt Nam nên con s3 em để ở singapore anh...Em có một thắc mắc chưa có câu trả lời là:
      Việc 1 lần upload 2 ảnh lên hosting và bucket của amazon có làm chậm tiến trình hơn bình thường ko anh vì nó phải up song song 2 cáu một lần?
       
  12. trangchongcheng

    trangchongcheng New Member

    Tiện ích bị lỗi sau khi em cài addon Media Gallery của xenforo anh ơi.
    Em chuyển sang chế độ default thì không lỗi, dùng s3 thì bị lỗi như hình dưới đây.
    Anh xem lại thử?
     

    Attached Files:

  13. MattW

    MattW Member

    I've just set up DO Spaces on my site, and new attachments are being added fine.

    Do we just need to run the rebuild to move all the existing data over?

    upload_2018-5-21_11-55-33.png
     
  14. alfa1

    alfa1 Active Member

    @xfrocks
    Does the DO space need to be public or private?
     
  15. MattW

    MattW Member

    Is it possible to have the Cache Rebuild for moving attachments to the new storage extended to work via the XF2 cli.php file? Would be much better having an option to do it via CLI as well.
     
  16. MattW

    MattW Member

    There really needs to be a better way to move the files over to S3 / DO Spaces. The browser is timing out constantly, and shows "page not found" when it does.

    5 hours in, and I'm only at around 50% based on the number of attachments I have in the ACP, and the number of files Spaces is showing in the "bucket"
     
  17. alfa1

    alfa1 Active Member

    Yes, I had loads of those as well on XF1.
     
  18. MattW

    MattW Member

    Getting flooded with these errors now:
    Code:
    InvalidArgumentException: Credentials must be an instance of Aws\Credentials\CredentialsInterface, an associative array that contains "key", "secret", and an optional "token" key-value pairs, a credentials provider function, or false. src/addons/Xfrocks/AttachmentStore/vendor/aws/aws-sdk-php/src/ClientResolver.php:414
    Generated by: Unknown account May 29, 2018 at 8:12 AM
    Stack trace
    #0 src/addons/Xfrocks/AttachmentStore/vendor/aws/aws-sdk-php/src/ClientResolver.php(291): Aws\ClientResolver::_apply_credentials(Array, Array, Object(Aws\HandlerList))
    #1 src/addons/Xfrocks/AttachmentStore/vendor/aws/aws-sdk-php/src/AwsClient.php(158): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
    #2 src/addons/Xfrocks/AttachmentStore/vendor/aws/aws-sdk-php/src/S3/S3Client.php(263): Aws\AwsClient->__construct(Array)
    #3 src/addons/Xfrocks/AttachmentStore/Fs.php(264): Aws\S3\S3Client->__construct(Array)
    #4 src/addons/Xfrocks/AttachmentStore/Fs.php(288): Xfrocks\AttachmentStore\Fs::getAdapterObj('s3', Array)
    #5 src/addons/Xfrocks/AttachmentStore/Fs.php(173): Xfrocks\AttachmentStore\Fs::registerIfNeeded('s3', Array)
    #6 src/addons/Xfrocks/AttachmentStore/Data/Storage.php(59): Xfrocks\AttachmentStore\Fs::buildPath('s3', Array, '2018/05/125395_...')
    #7 src/addons/Xfrocks/AttachmentStore/XF/Entity/AttachmentData.php(25): Xfrocks\AttachmentStore\Data\Storage->getAbstractedPathReplacement(Object(Xfrocks\AttachmentStore\XF\Entity\AttachmentData), '2018/05/125395_...', 'internal-data:/...')
    #8 src/XF/Entity/AttachmentData.php(190): Xfrocks\AttachmentStore\XF\Entity\AttachmentData->getAbstractedDataPath()
    #9 src/XF/Mvc/Entity/Entity.php(1517): XF\Entity\AttachmentData->_postDelete()
    #10 src/XF/Repository/Attachment.php(285): XF\Mvc\Entity\Entity->delete()
    #11 src/XF/Cron/CleanUp.php(112): XF\Repository\Attachment->deleteUnusedAttachmentData()
    #12 [internal function]: XF\Cron\CleanUp::runHourlyCleanUp(Object(XF\Entity\CronEntry))
    #13 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
    #14 src/XF/Job/Manager.php(241): XF\Job\Cron->run(8)
    #15 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 8)
    #16 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 8)
    #17 job.php(15): XF\Job\Manager->runQueue(false, 8)
    #18 {main}
     
    1. MattW

      MattW Member

      MattW @MattW Anything, or has support gone awol again?
       
  19. MattW

    MattW Member

    Any response to the above?
     
Loading...