[bd] Attachment Store for XenForo 1 [Paid] 1.3.7

Store attachment differently and more effectively.

  1. graham_w

    graham_w New Member

    I'm looking at using this for remote storage or attachments using FTP (I'd like to move all attachments to other server) but have 30 gig of attachments, and would like to be able to RSYNC files to external server prior to change so I don't have to sit and wait for files to be uploaded by "move files" tool.

    Is there a way this can happen ? Is it possible to keep same directory structure so we can simply rsync folders to new server and then run tool update to point to new file location ?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @graham_w Sorry you can't do that. This add-on has to update its database to keep track of the files. For your need, I suggest you to use [bd] Data Storage. You can use rsync or any other migration software with that add-on.
       
  2. graham_w

    graham_w New Member

    The data storage addon only does files in /data?

    So I use this addon to move attachments to /data folder on same server then the data storage addon to store them on another server ??

    I'd only want to use rsync for the initial transfer of data, FTP works fine for all new files.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @graham_w Yes, the other add-on deals with files in /data only (which includes avatar but not real attachment).
      In your case, yes, you should use this add-on to move attachment from internal_data to data and after that, install the other add-on (and rsync etc.) to serve files from remote server.

      It's a bit complicated I agree. For a simpler setup, you can use this add-on only and wait for the move.
       
  3. graham_w

    graham_w New Member

    Thank you for the responses, that method (using both addons) actually works very well.

    Cheers
     
  4. graham_w

    graham_w New Member

    Actually, it isn't working uploading new files.

    The full files are getting written to the local /data folder and also being uploaded to the remote folder (but the _thumbnail files are not) and getting an error

    upload_2015-1-15_13-44-22.png

    The error log shows the following :

    Code:
    XenForo_Exception: Failed to write the attachment thumbnail file. - library/XenForo/DataWriter/AttachmentData.php:161
    Generated By: graham, 2 minutes ago
    Stack Trace
    #0 /home/ozcards/public_html/beta/library/bdAttachmentStore/XenForo/DataWriter/AttachmentData.php(63): XenForo_DataWriter_AttachmentData->_postSave()
    #1 /home/ozcards/public_html/beta/library/XenForo/DataWriter.php(1409): bdAttachmentStore_XenForo_DataWriter_AttachmentData->_postSave()
    #2 /home/ozcards/public_html/beta/library/XenForo/Model/Attachment.php(524): XenForo_DataWriter->save()
    #3 /home/ozcards/public_html/beta/library/XenForo/ControllerPublic/Attachment.php(204): XenForo_Model_Attachment->insertUploadedAttachmentData(Object(XenForo_Upload), 5)
    #4 /home/ozcards/public_html/beta/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Attachment->actionDoUpload()
    #5 /home/ozcards/public_html/beta/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/ozcards/public_html/beta/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
      ["url"] => string(124) "http://ozcardtrader.com.au/beta/index.php?attachments/do-upload.json&hash=9f7af7e82d6d4b7ce0632ba951292f45&content_type=post"
      ["_GET"] => array(3) {
        ["attachments/do-upload_json"] => string(0) ""
        ["hash"] => string(32) "9f7af7e82d6d4b7ce0632ba951292f45"
        ["content_type"] => string(4) "post"
      }
      ["_POST"] => array(7) {
        ["Filename"] => string(14) "002-picsay.jpg"
        ["_xfResponseType"] => string(4) "json"
        ["_xfSessionId"] => string(32) "0842038fc0ff5a69d88514fb420d0036"
        ["_xfNoRedirect"] => string(1) "1"
        ["content_data"] => array(1) {
          ["thread_id"] => string(1) "1"
        }
        ["_xfToken"] => string(8) "********"
        ["Upload"] => string(12) "Submit Query"
      }
    }
    The main attachment file is being created locally and being uploaded to the remote server, but the _thumb file isn't being created locally (and therefore not being uploaded)

    With the data storage addon disabled and attachment store enabled saving locally to /data it works fine and as expected.

    Thanks
    Graham
     
  5. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    So in your tests, the full data is saved to remote server without issue but the thumbnail is failing?
     
  6. graham_w

    graham_w New Member

    Yes that is correct.

    With both addons enabled, full image is being written both locally and remote, but thumbnail is not being saved locally or remotely (and the attachment add fails)

    With just attachment store enabled, both full images and thumbnails are being created locally in /data as expected (and attachment add works fine)

    Cheers
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @graham_w Thanks for the detailed information. What are the versions of XenForo and both add-ons are you using? I assume you are running the latest?
       
  7. graham_w

    graham_w New Member

    Xenforo 1.4.4
    [bd] Attachment Store 1.1.3i
    [bd] Data Storage 1.1.2
     
  8. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  9. DaveX

    DaveX New Member

    For me it does not work. It only shows:
    Code:
     XenForo_Exception: Failed to write the attachment file. - library/XenForo/DataWriter/AttachmentData.php:145 
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @DaveX Are you using it with S3 or something else?
       
  10. DaveX

    DaveX New Member

    Yes i use s3. I found the problem. I need "eu-central-1". But i used "eu-west-1" in the options. Is it possible to use the "eu-central-1" in the region?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @DaveX Currently the Frankfurt region only supports the newer signature version (v4) which is not compatible with the system in place. Is it possible for you to use other region?
       
    2. DaveX

      DaveX New Member

      DaveX @xfrocks Yes, eu-west-1 is an alternative.

      Thanks for your support. :)
       
  11. DaveX

    DaveX New Member

    Is it possible to move later from one region to another?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @DaveX You will need to move back to default then move to the new region. Which is time consuming.
      The good news is I now have a version which works with Frankfurt region. If you are comfortable with running beta software, I can send it to you in private?
       
    2. DaveX

      DaveX New Member

      DaveX @xfrocks Thanks, but i already use the eu-west-1 region. It works fine for me.
       
    3. Nosxxx

      Nosxxx New Member

      Nosxxx @xfrocks Nice info. I would like to use Frankfurt. May you send me this addon for testing ?
       
    4. Fred.

      Fred. New Member

      Fred. @xfrocks Hi xfrocks,

      I also like to switch to the Frankfurt region.
      Even if you have "Keep Local Copy" enabled you have to go back to default?

      I also have to use new credentials because the old ones are not compatible.
       
  12. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Hi there,

    Sending you the new version. Just update the bucket and start uploading, new files should be uploaded to Frankfurt. Existing files will be served from Ireland.
     

    Attached Files:

  13. Nosxxx

    Nosxxx New Member

    I have an other problem. I use Xen Media Gallery and the tumbnails don't work with this addon :S

    The link looks like data/xengallery/1/1438-909e4575455a6b17b2d69872f36c4895.jpg?1428932969

    But this file isn't there.
     
    eva2000 likes this.
  14. Nosxxx

    Nosxxx New Member

    Featured Threads does also not work correctly. (Slider Images)
     
  15. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    XenGallery generates its own thumbnails. Have you tried again? It should work normally.

    I didn't know Featured Threads uses attachment?
     
  16. Nosxxx

    Nosxxx New Member

    Yep i know but if i activate the addon the images are stored in an false folder.

    Example:
    Xenforo Attachments are stored in data/attachments and xenmedia are stored in data/xengallery
    If i activate your Addon the tumbnails are stored in data/attachments not in data/xengallery


    Yes featured threads has an option to upload slider and avatar images.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Nosxxx I believe you use S3? The original thumbnails will then be saved in S3 with the full files. Are you saying the Gallery thumbnails are being put in data/attachments?

      Regarding Featured Threads, sorry I don't have access to the add-on to test it with this add-on. May I borrow access to your site?
       
    2. Nosxxx

      Nosxxx New Member

      Nosxxx @xfrocks Yes, the gallery images are being put into data/attachments instead of data/xengallery (I have the option delayed upload activated)
       
    3. eva2000

      eva2000 New Member

      #279 eva2000, May 15, 2015
      Last edited: May 15, 2015
      eva2000 @Nosxxx any fix for this as i get the same problem with thumbnails going to data/xengallery using XMG 1.05a and bd attachments 1.14
       
  17. Zelkova

    Zelkova New Member

    I'm having trouble when uploading to Xenforo Media Gallery the image is sent to S3 however Xenforo Media Gallery does not update. There is an error in the admin side.

    ErrorException: Fatal Error: Call to undefined function curl_init() -library/bdAttachmentStore/Helper/TempFile.php:22

    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}

    array(3) {
    ["url"] => string(31) "http://tria.tv/media/save-media"
    ["_GET"] => array(0) {
    }
    ["_POST"] => array(19) {
    ["type"] => string(5) "album"
    ["album_id"] => string(25) "2.MapleStory 2 Wallpapers"
    ["image_url"] => string(0) ""
    ["media_title_all"] => string(0) ""
    ["media_description_all"] => string(0) ""
    ["media_title"] => array(1) {
    ["image_upload"] => array(1) {
    [373] => string(4) "Meso"
    }
    }
    ["media_embed_url"] => array(2) {
    ["video_embed"] => array(1) {
    [373] => string(0) ""
    }
    ["image_upload"] => array(1) {
    [0] => string(0) ""
    }
    }
    ["media_description"] => array(1) {
    ["image_upload"] => array(1) {
    [373] => string(11) "Description"
    }
    }
    ["media_tag"] => array(1) {
    ["image_upload"] => array(1) {
    [0] => string(0) ""
    }
    }
    ["media_embed_url_original"] => array(1) {
    ["image_upload"] => array(1) {
    [0] => string(0) ""
    }
    }
    ["media_image_upload"] => string(4) "true"
    ["image_upload_hash"] => string(32) "26509f2ca7ac00486a8b671a0af18adc"
    ["container_type"] => string(5) "album"
    ["container_id"] => string(1) "2"
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(21) "/media/add?album_id=2"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    }
    }
     
  18. johndaroza

    johndaroza New Member

    So can you update for dropbox.com ?
     
Loading...