xfrocks submitted a new resource: Attachment Store for XenForo 2.0 - Store attachment differently and more effectively. Read more about this resource...
xfrocks updated [bd] Attachment Store for XenForo 2.0 with a new update entry: v2.0.0 Read the rest of this update entry...
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? .
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. .
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" } } .
xfrocks @rsi We are coming back to check on this and it seems to work fine. How is it going on your site?
Please add support for digitalocean spaces: https://www.digitalocean.com/products/spaces/ https://developers.digitalocean.com/documentation/
xfrocks @alfa1 It does support DigitalOcean Spaces https://xfrocks.com/other/threads/bd-attachment-store-for-xenforo-2-faq.622/
Tình hình là em làm theo các bước như hướng dẫn này: https://xfrocks.com/other/articles/howto-xenforo-attachments-via-amazon-s3-and-cloudflare.59/ Nhưng khi upload ảnh lên thì load mãi, khi post thread thì báo lỗi như hình dưới đây. Hình ảnh thì vẫn lên Bucket của amazon (xem ở file đính kèm) Nguyên nhân do đâu a?
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é.
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?
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.
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?
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ử?
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?
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.
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"
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}