@xfrocks Hi, your plugin works great. Thank you. But i have a problem with avatars which needs to be solved. Normally, i moved my avatars to CDN from command line. Then i put config.php this line; $config['externalDataUrl'] = 'https://cdn.otopark.com/forum/data'; And all of my avatars came back to life. But i realised that (as it supposed) users started having problems with uploading avatar. When i try to upload avatar, i choose my new avatar. Avatar thumbnail flashes but it still showes up the old one. Because it can't upload it (it doesn't have any CDN credentals) I deleted this line to solve that problem. And it solved, but all avatars are now routed to normal URL. (ex. https://otopark.com/forum/..... bla bla) OTOPARK.COM | Sürücünün Adresi OTOPARK.COM Forum araç meraklıları ve kullanıcılarının birbirleriyle etkileşimini sağlayan bir platformdur. otopark.com I tried to run "Update attachment storage options" and "Move attachment data" that didn't solve that. It looks like plugin doesn't do anything about uploading avatars. Is there is any easy way to implement that or do you have any ideas?
xfrocks @Berkin For avatars, you need to configure this https://xfrocks.com/resources/bd-attachment-store-for-xenforo-2-0.35/update?update=184 [bd] Attachment Store for XenForo 2.0 Store attachment differently and more effectively. xfrocks.com
Berkin @xfrocks Yeah i saw that and added to config php like that; $config['fsAdapters']['data'] = function () { return \Xfrocks\AttachmentStore\Fs::getAdapterDefault(); }; $config['externalDataUrl'] = function ($externalPath, $canonical) { return 'https://cdn.otopark.com/' . $externalPath; }; But all avatars gone and when i tried to run attachment move tool it didnt help. (Note: For now in website i configured URL as cdn.otopark.com/data because i put my avatars manually to there) It looks like there is a thing that i didnt do.
I'm using this addon with DO Spaces and sometimes got an errors like this ErrorException: [E_NOTICE] Trying to get property 'bdattachmentstore_engine' of non-object src/addons/Xfrocks/AttachmentStore/XF/ControllerPlugin/Attachment.php:15 Stack trace #0 src/addons/Xfrocks/AttachmentStore/XF/ControllerPlugin/Attachment.php(15): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/nginx/dom...', 15, Array) #1 src/XF/Pub/Controller/Attachment.php(43): Xfrocks\AttachmentStore\XF\ControllerPlugin\Attachment->displayAttachment(Object(XF\Entity\Attachment)) #2 src/addons/Xfrocks/AttachmentStore/XF/Pub/Controller/Attachment.php(16): XF\Pub\Controller\Attachment->actionIndex(Object(XF\Mvc\ParameterBag)) #3 src/XF/Mvc/Dispatcher.php(321): Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment->actionIndex(Object(XF\Mvc\ParameterBag)) #4 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Index', Object(XF\Mvc\RouteMatch), Object(Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment), NULL) #5 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment), NULL) #6 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #7 src/XF/App.php(2177): XF\Mvc\Dispatcher->run() #8 src/XF.php(390): XF\App->run() #9 index.php(20): XF::runApp('XF\\Pub\\App') #10 {main} Request state array(4) { ["url"] => string(20) "/attachments/655433/" ["referrer"] => bool(false) ["_GET"] => array(1) { ["/attachments/655433/"] => string(0) "" } ["_POST"] => array(0) { } } How i can fix it?
We are upgrading from 1.5 to 2.1 and have upgraded the addon We are having the issue that no images show. We are using S3 and Cloudflare as per 1.5. You can upload the images to S3 and this is working. However when the images are being displayed in Xenforo there is additional code being added to the end of the attachment URL that is stopping it from working. Can you shed any light on this. Here is the example below: Link to Thread: http://18.203.48.239/index.php?threads/farmer-roys-random-thoughts-i-never-said-it-was-easy.186684/page-899#post-6070281 Image link in View Source Code: http://18.203.48.239/index.php?attachments/photo-08-11-2015-12-19-06-jpg.775985/ Image link from Xenforo that is generated: http://d21zkh06156iu1.cloudfront.net/2019/04/777339_7a16d2b74842f38c056a9707391fd63f.jpg?Expires=1556178988&Signature=CcSDnE0iNXqkkNJWY4Ch8SgwnBSGgGSbQzTEE5fRxMPgFlTlSoPax6ffQVzPSKVV4Gr49gNBWg3dJFE3NV0jW9XMIy~bGggHQCCez~TijDIdBSkO~tOdVyJJjCa-vObKezt-5NZ9xi5TuT-ijTVoEYVSG~gpUAXs6EqN6SYY3hTmAhbLRY9uQCCXsSPFjVQIPGucDCR~WJWq2WAj2ij1gb9siHenikuev3Ztjg6-3MtOTa8TVgJ-uZ90kdcXlkN0AUNIv5RxIYjR5fxC9UzHxgtqQ3V6ePSSjU~MMqfA8JOHUG9Z1-gqmf3UmSkOGGHMis3VShP5IN9l~Dt503s-Gw__&Key-Pair-Id=APKAI3FUQAMYQSG3SXKQ Image on Cloudfront that works: http://d21zkh06156iu1.cloudfront.net/2019/04/777339_7a16d2b74842f38c056a9707391fd63f.jpg Why and where is everything after the "?" being added?
If we do full data, do we have to copy everything over? I agree that an updated guide would be helpful.
Too many errors: 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 20/05/2019, lúc 07:10 #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(316): Aws\S3\S3Client->__construct(Array) #4 src/addons/Xfrocks/AttachmentStore/Fs.php(345): Xfrocks\AttachmentStore\Fs::getAdapterObj('s3', Array) #5 src/addons/Xfrocks/AttachmentStore/Fs.php(201): Xfrocks\AttachmentStore\Fs::registerIfNeeded('s3', Array) #6 src/addons/Xfrocks/AttachmentStore/Data/Storage.php(59): Xfrocks\AttachmentStore\Fs::buildPath('s3', Array, '2019/04/340_5f4...') #7 src/addons/Xfrocks/AttachmentStore/XF/Entity/AttachmentData.php(25): Xfrocks\AttachmentStore\Data\Storage->getAbstractedPathReplacement(Object(Xfrocks\AttachmentStore\XF\Entity\AttachmentData), '2019/04/340_5f4...', 'internal-data:/...') #8 src/XF/Entity/AttachmentData.php(217): Xfrocks\AttachmentStore\XF\Entity\AttachmentData->getAbstractedDataPath() #9 src/XF/Mvc/Entity/Entity.php(1580): XF\Entity\AttachmentData->_postDelete() #10 src/XF/Repository/Attachment.php(320): XF\Mvc\Entity\Entity->delete() #11 src/XF/Cron/CleanUp.php(120): 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(253): XF\Job\Cron->run(G) #15 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G) #16 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G) #17 job.php(42): XF\Job\Manager->runQueue(false, 8) #18 {main}
Bought this as it said FTP we assumed it would cover both FTP & SFTP, but I use SFTP (FTP is disabled on my dedicated servers for security reasons) sadly it isn't working and produces server errors. Is there a way to enable it to use SFTP? (Port 22) The server logins are valid, ports were set and file paths etc, chmod 777 on remote data folder too. Is there a way to fix this please?
xfrocks @W.D No, ftp and sftp are two different protocols (despite the similarity in their names). We do not support sftp at the moment.
I attempted to use the cache rebuild tool to move everything back locally and it appears to have broken all attachments. The attachments are still referencing the CloudFront URL, which no longer works. Suggestions on how to fix this ASAP please?
xfrocks @joec It's fairly simple to add support for GCS but it will increase the add-on package download size. If there is demand we will certainly do it though.
When uploading an mp4 the file never gets copied over to S3 or removed from the local /data/videos directory. Also, when I delete the video from the admin "Attachment Browser" the file remains on disk.
Unfortunately when I upgraded from 1.5 to 2.1, some of my attachments have disappeared. I don't know how to even start troubleshooting this. I am using the external /data folder as the point for the attachments. Look at two examples, first one works, second they are gone: https://www.avsite.gr/forum/threads/Το-σαλόνι-που-ατμίζει-dloger.160622/post-2453948 https://www.avsite.gr/forum/threads/Το-σαλόνι-που-ατμίζει-dloger.160622/post-2455869
dakis @xfrocks I ended up uploading all the missing attachments from my backup. I do not know why this happened but I have one more forum to upgrade and I do not want to have the same issue, do you know what may have caused this ?
xfrocks @dakis 50GB is not too big, I will create a new server on Digital Ocean with 4vCPU, 8GB RAM, 160GB SSD for you.
Hello there, I'm doing some tests before upgrading my forum from 1.5.x to 2.1.x. Upgraded to 2.1.3, uploaded the addon for xf 2 and worked perfect from start.Had the settings ready from the main installation. I see many users here having issues with this add-on, what the hell. I never had any issue with the addon. i'm using it 2 years and never had issue At this post i want to ask the same thing i did for xf 1.5 January 10, 2018 https://xfrocks.com/other/threads/bd-attachment-store-for-xenforo-1-paid.58/page-26#post-5814 How i can do this for xf 2.1.x please? Like i said i don't have any issue and never had. I just don't remember how do we made it work for xf 1.5. My question: One thing I would like to know is if there any way to preserve the filenames of the files i download from S3, so instead of having a filename composed by ID_HASH.zip to have the OriginalName.zip. Is there any option or configuration of the module that allows this or can it be done via code?
fmsc88 C'mon please tell me how i can do that,everything works perfect. The only issue i have is when i download resource to my pc it's named Code: 19200_a911d84966f2f10bc5d70b69dad68ac0.zip For xf 1 works fine,the zip file has the correct name when i download resource to my pc. I'm preparing to update to xenforo 2.1 and this is the only thing stoping me to do so.
xfrocks @fmsc88 Looks like there is a bug with that feature (keeping file name in S3) in the XF2 version. We will attempt a fix and release a new version to address it.
xfrocks @fmsc88 v2.0.2 has just been released with the fix for this. Please try upgrading and see whether it works for you. Sorry for the inconvenience.
xfrocks updated [bd] Attachment Store for XenForo 2.0 with a new update entry: Compatibility Update Read the rest of this update entry...
vlady @xfrocks Errors "Trying to get property 'bdattachmentstore_engine' of non-object" still appears
xfrocks @vlady Your stack trace is similar to this? Code: #0 src/addons/Xfrocks/AttachmentStore/XF/ControllerPlugin/Attachment.php(15): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/nginx/dom...', 15, Array) #1 src/XF/Pub/Controller/Attachment.php(43): Xfrocks\AttachmentStore\XF\ControllerPlugin\Attachment->displayAttachment(Object(XF\Entity\Attachment)) #2 src/addons/Xfrocks/AttachmentStore/XF/Pub/Controller/Attachment.php(16): XF\Pub\Controller\Attachment->actionIndex(Object(XF\Mvc\ParameterBag)) #3 src/XF/Mvc/Dispatcher.php(321): Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment->actionIndex(Object(XF\Mvc\ParameterBag)) #4 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Index', Object(XF\Mvc\RouteMatch), Object(Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment), NULL) #5 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Xfrocks\AttachmentStore\XF\Pub\Controller\Attachment), NULL) #6 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #7 src/XF/App.php(2177): XF\Mvc\Dispatcher->run() #8 src/XF.php(390): XF\App->run() #9 index.php(20): XF::runApp('XF\\Pub\\App') #10 {main}
Seems to be a bug with the recent update? Code: Server error log RuntimeException: find '' -type f > '/home/nginx/domains/domain.com/public/internal_data/temp/attachMover20190904_iSIAyY' src/addons/Xfrocks/AttachmentStore/Service/Mover.php:42 Generated by: Unknown account Sep 4, 2019 at 11:37 AM Stack trace #0 src/addons/Xfrocks/AttachmentStore/Job/Move.php(53): Xfrocks\AttachmentStore\Service\Mover->backupPathPrepare(NULL) #1 src/XF/Job/Manager.php(253): Xfrocks\AttachmentStore\Job\Move->run(15) #2 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, 15) #3 src/XF/Job/Manager.php(146): XF\Job\Manager->runJobEntry(Array, 15) #4 src/XF/Cli/Command/JobRunnerTrait.php(30): XF\Job\Manager->runUnique('Xfrocks\\Attachm...', 15) #5 src/XF/Cli/Command/JobRunnerTrait.php(13): Xfrocks\AttachmentStore\Cli\Command\Move->runJob('Xfrocks\\Attachm...', NULL) #6 src/addons/Xfrocks/AttachmentStore/Cli/Command/Move.php(57): Xfrocks\AttachmentStore\Cli\Command\Move->setupAndRunJob('Xfrocks\\Attachm...', 'Xfrocks\\Attachm...', Array) #7 src/vendor/symfony/console/Command/Command.php(255): Xfrocks\AttachmentStore\Cli\Command\Move->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 src/vendor/symfony/console/Application.php(960): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Xfrocks\AttachmentStore\Cli\Command\Move), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 cmd.php(15): XF\Cli\Runner->run() #13 {main} Request state array(1) { ["cli"] => string(69) "/home/nginx/domains/domain.com/public/cmd.php attachment-store:move" }
xfrocks @RoldanLT Yes, if you need to run the move cli right away. Please use this beta https://www.dropbox.com/s/6e92b08qjjbwfvm/Xfrocks-AttachmentStore-20.0.3 Beta 3.zip?dl=0
I just moved 450k+ images using this addon to /data/attachment-files/ directory. (without Maintain File Name option check). So my 450k+ images are filename as: {data_id}_{file_hash}.{extension} Now I just enable "Maintain File Name" as I want all images to have this filename: {data_id}_{name}.{extension} How can I update old images on /data/attachment-files/ to have the new file name? I've run the Move Tool, but it doesn't change old files. Thanks a lot Sir.
xfrocks @RoldanLT Ah, I have just replied you on xenforo.com. > The safest way is to switch back to Default, run the move tool, then switch to external data (with maintain filename) and run the move tool.
xfrocks @RoldanLT That sounds like a bug... If you happen to do something similar again, please let me know so I can pin point the issue (and hopefully fix it).
xfrocks @RoldanLT Can you share the attachment link? Screenshot of the ignored list should be useful too.
xfrocks updated [bd] Attachment Store for XenForo 2.0 with a new update entry: Minor update Read the rest of this update entry...