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

Store attachment differently and more effectively.

  1. RoldanLT

    RoldanLT Active Member

    My version installed was from our Private Conversation on XenForo, and trying to update to this version got this error:
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @RoldanLT Can you check in AdminCP, which version has been installed?
       
      RoldanLT likes this.
      1
    2. RoldanLT

      RoldanLT Active Member

      RoldanLT @xfrocks [bd] Attachment Store 20.0.3 Beta 3
       
  2. RoldanLT

    RoldanLT Active Member

    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @RoldanLT Ah, that beta got an incorrect version number. You will need to run this query to fix it, this query is one time only. After upgrading to proper 2.0.3, you will be able to proceed with future upgrade normally.

      Code:
      UPDATE xf_addon SET version_id = 2000333 WHERE addon_id = 'Xfrocks/AttachmentStore' AND version_id = 20000333;
      Sorry for the inconvenience.
       
      RoldanLT likes this.
      1
    2. RoldanLT

      RoldanLT Active Member

      RoldanLT @xfrocks Thanks!
      1 row affected. (Query took 0.0029 seconds.)
       
  3. RoldanLT

    RoldanLT Active Member

    Upgraded fine now, thank you so much!
     
    xfrocks likes this.
  4. phucvdinh

    phucvdinh New Member

    @xfrocks Currently I am using this add-on to store attachments on DO Space, the only problem is that the image attachment get downloaded automatically when I click the direct link.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @phucvdinh How is that a problem?
       
    2. phucvdinh

      phucvdinh New Member

      phucvdinh @xfrocks As an user, I really don't like to save image automatically, some images have high resolution, instead of download the image, I just need to view it through direct link and decided whether save it or not.
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @phucvdinh The URL will expire after a while.

      Normally browser will display renderable contents and download everything else. What file type are you worrying about?
       
    4. phucvdinh

      phucvdinh New Member

      phucvdinh @xfrocks Just common image extension (gif, png, jpg, jpeg...)
      Code:
      "Content-Disposition", inline; filename="filename.jpg"
      With this header, image still able to being viewed with url while save as still save image with a proper file name!
       
  5. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  6. cjwinternet

    cjwinternet New Member

    Currently getting this server error message from the hourly cleanup CRON entry, and actually since August !... We must now have tens of thousands of images need to be uploaded to the CDN...

    • RuntimeException: Could not login with connection: push-20.cdn77.com::21, username: user_ud80k60i
    The username and host name is not ours, although it's similar, and it's not the one set in the attachment settings. I don't know where it's getting it from.

    Regards

    Chris
     
  7. Semper Fidelis

    Semper Fidelis New Member

    #176 Semper Fidelis, Apr 9, 2020
    Last edited: Apr 9, 2020
    I am currently using the 1.x plugin version and am about to upgrade to XF 2.1. How do I upgrade this plugin for XF 2.1? When I initially migrate the old plugin will be disabled. When I install this new version will it find my old attachment store settings and "re-associate" attachments to threads?

    OR do I need to migrate attachments back to my server before I upgrade the forum and then install the 2.x version and then migrate them back to s3?
     
  8. Berkin

    Berkin New Member

    @xfrocks Hello, is it okay to update Wordpress 5.4? Is there is any compatibility problem with that version for your plugin?
     
  9. RoldanLT

    RoldanLT Active Member

    Will this addon be updated and add full support for XMG 2.1.x?

    I can't upload videos on XMG with this addon enabled for video attachment as File will always report as already present/duplicate on /data/attachment-files/

    Thanks.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @RoldanLT Version 2.1.2 has just been released with improved support for XFMG. Please upgrade and let me know if it works for you.
       
      RoldanLT likes this.
      1
    2. RoldanLT

      RoldanLT Active Member

      RoldanLT @xfrocks Thanks, I still got errors:
      Code:
      Server error log
      League\Flysystem\FileExistsException: File already exists at path: attachment-files/2020/06/2075767_file_example_WEBM_480_900KB.webm src/vendor/league/flysystem/src/Filesystem.php:405
      Generated by: Unknown account Jun 27, 2020 at 12:38 AM
      
      Stack trace
      #0 src/vendor/league/flysystem/src/Filesystem.php(211): League\Flysystem\Filesystem->assertAbsent()
      #1 [internal function]: League\Flysystem\Filesystem->rename()
      #2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array()
      #3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod()
      #4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(303): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall()
      #5 src/vendor/league/flysystem/src/MountManager.php(240): League\Flysystem\EventableFilesystem\EventableFilesystem->rename()
      #6 src/addons/XFMG/Attachment/Media.php(217): League\Flysystem\MountManager->move()
      #7 src/addons/XFMG/Service/Media/Creator.php(258): XFMG\Attachment\Media->onAssociation()
      #8 src/XF/Service/ValidateAndSavableTrait.php(40): XFMG\Service\Media\Creator->_save()
      #9 src/addons/XFMG/Service/Media/Transcoder.php(173): XFMG\Service\Media\Creator->save()
      #10 src/XF.php(479): XFMG\Service\Media\Transcoder->XFMG\Service\Media\{closure}()
      #11 src/addons/XFMG/Service/Media/Transcoder.php(193): XF::asVisitor()
      #12 src/addons/XFMG/Ffmpeg/transcoder.php(50): XFMG\Service\Media\Transcoder->finalizeTranscode()
      #13 {main}
      
      Request state
      array(1) {
        ["cli"] => string(80) "/public/src/addons/XFMG/Ffmpeg/transcoder.php 25"
      }
       
    3. RoldanLT

      RoldanLT Active Member

    4. RoldanLT

      RoldanLT Active Member

  10. Wildling

    Wildling New Member

    I've upgraded to XF2 last night. I did not uninstall the XF1 attachment plugin. Just disabled.
    Upgraded to XF2. Installed new XF2 attachment plugin, and now my attachments are giving me this error
    Code:
    <Error>
    <Code>AccessDenied</Code>
    <Message>Query-string authentication requires the Signature, Expires and AWSAccessKeyId parameters</Message>
    <RequestId>CC99408EAB7105CB</RequestId>
    <HostId>ivy/S+tHRD3wa1PUaX1crilvPVc48mELly1WRC+T0jZ01uSStAq+u65CqaLXD/kgw3iipw6xZZQ=</HostId>
    </Error>
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Wildling You use CloudFront signed URL for your site?
       
    2. Wildling

      Wildling New Member

      Wildling @xfrocks Yes
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Wildling Can you start a convo with me and share the current attachment options? I'll need to reproduce to figure out what went wrong.
       
  11. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    RoldanLT likes this.
  12. Semper Fidelis

    Semper Fidelis New Member

    When do you think you'll have a release for XF 2.2?
     
    RoldanLT likes this.
  13. venaga

    venaga New Member

    #193 venaga, Jul 30, 2020
    Last edited: Jul 30, 2020
    Ftp server = pureftp running on centos7
    XF version:2.1.10 p2
    XF AS=2.1.2
    ping vulue from web server to ftp server = 0.5 ms without packet loss.


    I'm using FTP MODE,
    but I got so many errors like this:

    微信截图_20200730122928.png



    Code:
    League\Flysystem\FileNotFoundException: Could not move #1463315: File not found at path: attachments/1463/1463315-c7bc14f84d2a8ed85d57538a1f9a0049.data src/vendor/league/flysystem/src/Filesystem.php:389
    生成于: 未知帐户 2020-07-30,11:52
    Stack 追踪
    #0 src/vendor/league/flysystem/src/Filesystem.php(194): League\Flysystem\Filesystem->assertPresent('attachments/146...')
    #1 [internal function]: League\Flysystem\Filesystem->readStream('attachments/146...', 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/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array)
    #5 src/vendor/league/flysystem/src/MountManager.php(184): League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('attachments/146...')
    #6 src/addons/Xfrocks/AttachmentStore/Service/Mover.php(178): League\Flysystem\MountManager->copy('attachments/146...', 'Xfrocks-Attachm...')
    #7 src/addons/Xfrocks/AttachmentStore/Service/Mover.php(127): Xfrocks\AttachmentStore\Service\Mover->copy(Object(League\Flysystem\MountManager), 'internal-data:/...', 'Xfrocks-Attachm...', false, Object(Xfrocks\AttachmentStore\XF\Entity\AttachmentData))
    #8 src/addons/Xfrocks/AttachmentStore/DelayQueue.php(92): Xfrocks\AttachmentStore\Service\Mover->move(Object(Xfrocks\AttachmentStore\XF\Entity\AttachmentData), 'ftp')
    #9 src/addons/Xfrocks/AttachmentStore/Job/DelayQueue.php(16): Xfrocks\AttachmentStore\DelayQueue->run(Object(XF\Pub\App), G)
    #10 src/XF/Job/Manager.php(253): Xfrocks\AttachmentStore\Job\DelayQueue->run(G)
    #11 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
    #12 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
    #13 job.php(42): XF\Job\Manager->runQueue(false, 8)
    #14 {main}
    请求状态
    array(4) {
      ["url"] => string(8) "/job.php"
      ["referrer"] => string(49) "https://www.xxx.com/index.php?threads/4681861/"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(0) {
      }
    }

    Code:
    Exception: Could not move #1463283: Data is unavailable src/addons/Xfrocks/AttachmentStore/Service/Mover.php:76
    生成于: 未知帐户 2020-07-30,11:37
    Stack 追踪
    #0 src/addons/Xfrocks/AttachmentStore/DelayQueue.php(92): Xfrocks\AttachmentStore\Service\Mover->move(Object(Xfrocks\AttachmentStore\XF\Entity\AttachmentData), 'ftp')
    #1 src/addons/Xfrocks/AttachmentStore/Job/DelayQueue.php(16): Xfrocks\AttachmentStore\DelayQueue->run(Object(XF\Pub\App), G)
    #2 src/XF/Job/Manager.php(253): Xfrocks\AttachmentStore\Job\DelayQueue->run(G)
    #3 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
    #4 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
    #5 job.php(42): XF\Job\Manager->runQueue(false, 8)
    #6 {main}
    请求状态
    array(4) {
      ["url"] => string(8) "/job.php"
      ["referrer"] => string(42) "https://www.xxx.com/index.php?forums/8/"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(0) {
      }
    }
     
  14. Berkin

    Berkin New Member

    @xfrocks

    I found out a small problem (maybe it is not but) I just wanted to share with you.

    I was using version 2.1.0 without any problem. Then I upgraded to version 2.1.1 and I found out that when I right click and open images on new tab, browser tries to download it (Safari).

    I didn't tried on other browsers, I just checked codes and see that it caused by a code in Fs.php

    Line 137:
    PHP:
    $config['ContentDisposition'] = sprintf('attachment; filename=%s;'$safeFileName);
    I removed "attachment; filename=%s;" from it and it resolved. But right now I got error on admin panel side, says "There are 1 missing files or files with unexpected contents. You should review these."

    Is this a problem, and did I do the right thing? I am using Digitalocean Spaces CDN for images. And I actually worried about updating 2.1.2. Can I just upgrade it and edit that Fs.php again?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Berkin Yes, that's the designed behavior. For images, they are usually rendered as thumbnail or full image or in an overlay so the content disposition header is not an issue.

      For other file types, it's safer to force a download instead of letting the browser render itself. This is mostly a security measure to protect users from unsafe attachments (uploaded by some random user).
       
  15. Semper Fidelis

    Semper Fidelis New Member

    Now that Xenforo 2.2 is released, will you be updating the plugin?
     
    TimNL likes this.
    1. TimNL

      TimNL New Member

      TimNL @Semper Fidelis There seems to be an issue that images as an attachment in a post will open in a new tab instead of in the lightbox since 2.2. So we would need an update.
       
  16. Semper Fidelis

    Semper Fidelis New Member

    I currently have the "Keep Local Files" unchecked.

    Could I simply copy the files from S3 back to my local server in order to disable the plugin and keep my attachments?
     
  17. RoldanLT

    RoldanLT Active Member

  18. TimNL

    TimNL New Member

    It seems that the options 'Root URL' and 'Maintain File Name' under 'External Data' are not working.

    I can fill out everything in 'Root URL' but it keeps using the externalDataUrl specified in config.php.

    Also Maintain File Name is not changing anything? It choosed the same logic of making the file name, with and without this option selected.
     
  19. Semper Fidelis

    Semper Fidelis New Member

    @xfrocks - Can you please weigh in? Do you intend to release an update to this plugin so it is compatible with Xenforo 2.2?

    If the answer is not, then that's OK but I need to know one way or another so I can move forward.
     
  20. RoldanLT

    RoldanLT Active Member

    What specifically your issue guys with XF 2.2.0 and this addon?
    Works fine for my testing.
     
    1. Semper Fidelis

      Semper Fidelis New Member

      Semper Fidelis @RoldanLT Thanks for the reply.
      @TimNL wrote above:
      There seems to be an issue that images as an attachment in a post will open in a new tab instead of in the lightbox since 2.2. So we would need an update.​

      Are you experiencing this at all?
       
    2. RoldanLT

      RoldanLT Active Member

      RoldanLT @RoldanLT Nope, works fine for me.
       
    3. Semper Fidelis

      Semper Fidelis New Member

      Semper Fidelis @RoldanLT Thanks. I pulled the trigger and the upgrade worked for me too.

      @xfrocks - disregard my note...
       
      RoldanLT likes this.
      1
Loading...