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

Store attachment differently and more effectively.

  1. littlebigdunc

    littlebigdunc New Member

    Hi quick question reguarding setting up a ftp server to this addon

    the following im just wondering what i need to set them to

    'path' => '/home/user/domains/domain.com/public_html/data',
    'url' => 'https://cdn.domain.com/data',

    is Path the current directory of the data/atatchments to backup to the ftp?
     
  2. Semper Fidelis

    Semper Fidelis New Member

    Is there any way to resore files from S3 back to the server? The plugin saves files into folders based on year while Xenforo seems to just same files into 10 folders from 01 to 10.
     
  3. Berkin

    Berkin New Member

    @xfrocks Hello, is it fine to update Xenforo 2.3?

    Are you planning to release an about, cause it seems like there are some updates related with images and don't know if the plugin would get broken or not.

    Thank you.
     
  4. RoldanLT

    RoldanLT Active Member

    Hopefully this add-on gets updated for XF 2.3 or 3.0.
     
  5. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Yes, this add-on will be updated for XF2.3.
     
    vitoreis, Berkin and RoldanLT like this.
  6. vitoreis

    vitoreis New Member

    Roger, we have problems:

    Code:
    Error: Call to undefined function GuzzleHttp\Psr7\mimetype_from_extension() in src/addons/Xfrocks/AttachmentStore/Util/MimeType.php at line 24
    Xfrocks\AttachmentStore\Util\MimeType::guessByFileName() in src/addons/Xfrocks/AttachmentStore/Fs.php at line 134
    Xfrocks\AttachmentStore\Fs->putStream() in src/vendor/league/flysystem/src/MountManager.php at line 615
    League\Flysystem\MountManager->putStream() in src/XF/Util/File.php at line 216
    XF\Util\File::copyFileToAbstractedPath() in src/XF/Service/Attachment/PreparerService.php at line 89
    XF\Service\Attachment\PreparerService->insertDataFromFile() in src/XF/Service/Attachment/PreparerService.php at line 49
    XF\Service\Attachment\PreparerService->insertAttachment() in src/XF/Attachment/Manipulator.php at line 202
    XF\Attachment\Manipulator->insertAttachmentFromUpload() in src/XF/Pub/Controller/AttachmentController.php at line 95
    XF\Pub\Controller\AttachmentController->actionUpload() in src/XF/Mvc/Dispatcher.php at line 362
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 265
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2813
    XF\App->run() in src/XF.php at line 802
    XF::runApp() in index.php at line 23
    After update to v2.3.2... any help?
     
  7. azzurro

    azzurro New Member

    #234 azzurro, Oct 7, 2024
    Last edited: Oct 7, 2024
    Just updated to v2.3.3 and also getting this error. Help!

    Edit:
    If I disable the add-on, attachments work for recent images since 2020, but for not for older images (2016-2020) and I can upload new attachments. If I re-enable the add-on, all previous images work, but I get the previously mentioned error when trying to upload an image.

    For now I have disabled the add-on. I don't recall the change in attachments around 2020 but would like to get the older images working, I believe I have them locally in a folder called "attachment-files".
     
    1. vitoreis

      vitoreis New Member

      vitoreis @azzurro I have the add-on disabled too. But I can't see any images on S3 :-(

      Xfrocks don't respond for some months, we don't know if he is on the business or if he has the time to update the add-on.
      Maybe we, together, can fund another developer to update the add-on. If anyone can join us…
       
  8. azzurro

    azzurro New Member

    That's unfortunate, yes it's difficult when we don't get a response or timeline. Hopefully there is a way to restore. Is your case similar, currently on your site users can upload attachments, just the older ones don't show?

    It seems there should be a way to convert the older images stored with the addon to be compatible with the current system. I did search a bit through older posts and it was suggested to run the "Update attachment storage options" job in the "Rebuild caches" admin section to set images to "Default". But that didn't seem to do anything on my initial test.
     
    1. vitoreis

      vitoreis New Member

      vitoreis @azzurro Yes, with the add-on disabled on my site users can upload attachments, just the older ones don't show.

      In my case, running the "Update attachment storage options" job in the "Rebuild caches" admin section to set images to "Default" didn't seem to work, but with some terabytes of images on S3 (20 years of data) is not viable to move it to local server.
       
    2. azzurro

      azzurro New Member

      azzurro @vitoreis Got it, yes that is quite a lot of data! Mine is likely less than 1 GB, so I can see how it is important for you.

      Do you have an s3 solution now for users that are uploading currently? I have been using the " storage option which was an addon but now built into XF 2.3 (https://xenforo.com/community/resou...on-s3-for-file-storage-in-xf-2-1-xf-2-2.6805/). Over the years I have lost track a bit the details of how it works so with this issue am looking at it again.

      Since the old data is on s3, perhaps we need a modified plugin that can read the BD storage information, it just doesn't try to do anything when new attachments are uploaded.
       
  9. azzurro

    azzurro New Member

    @vitoreis I looked a bit further into the error and it appears the Guzzle syntax changed, see:

    https://github.com/guzzle/psr7#upgrading-from-function-api

    I made this change to /src/addons/Xfrocks/AttachmentStore/Util/MimeType.php

    Code:
    Change line 24:
            $mimeType = \GuzzleHttp\Psr7\mimetype_from_extension($extension);
    To:
            $mimeType = \GuzzleHttp\Psr7\MimeType::fromExtension($extension);
    
    I'm now able to see the old attachments and add new ones without an error. See if this works for you!
     
Loading...