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

Store attachment differently and more effectively.

  1. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Correct.

    Yes.

    For your existing files, you can move them to S3 if you want. There is a tool bundled with the add-on.
     
  2. cees50

    cees50 New Member

    @xfrocks thanks for youre answer

    Mmm thats saving a lot off money. Now i have to hire a VPS with a lot of disk space. If i can cut on the diskspace, the VPS is gonna be a lot cheaper.. :)


    If i choose for putting all the aatachments on S3, why should i want them on my server also? (keep local information)
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @cees50 Keeping a local copy can serve as a backup mechanism. People use S3 for speed and availability too, not just for space saving (or cost saving).
       
  3. cees50

    cees50 New Member

    Get it. Thanks. :)
     
  4. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  5. mattdewald

    mattdewald New Member

    Is there an easy way to apply this plugin to work for avatars as well as attachments? Trying to store all static uploads to S3 without the use of S3FS.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @mattdewald Currently no. In the foreseeable future, unlikely. But I may try to do that sometime because that's what I want too.
       
  6. KISS

    KISS New Member

    I'm sorry, but I don't understand what "set private access" is. Can you explain with an scenario? Thank you!
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @KISS Normally, a file can be downloaded using S3 URL or CloudFront URL. If you set it to private, only signed CloudFront URL can be used to download the file. It's a security feature.

      For more information, see here https://xfrocks.com/other/threads/howto-xenforo-attachments-via-amazon-s3-and-cloudfront.60/

      [HOWTO] XenForo attachments via Amazon S3 and CloudFront

      Prerequisite: XenForo 1.1.4+ [bd] Attachment Store 0.9.7+ Step 1. Obtain Amazon Web Services Security Credentials + CloudFront Key Pair Follow step 1...
      xfrocks.com
       
  7. KISS

    KISS New Member

    Ok thank you, I think I understand. So, if I serve using cloudfront (without "set private access"), users will still be able to download the file if they have the direct link right? But the link on the forum is will check permissions first before allowed to download?

    Another question...
    If I don't check "keep local copy" now, but later I check it, will the plugin auto-transfer the files from S3 onto my local drive?

    Thanks!
     
  8. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Correct.

    No. It will not transfer the files automatically. If you wish to go back to local storage later, you will need to run the rebuild tool.
     
  9. KISS

    KISS New Member

    This may sound dumb but I'm new to xenforo.
    The rebuild tool is it the one under Tools > Rebuild Attachment Data Storage?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @KISS That's correct. Make sure you set the working mode to default before running the tool for the add-on to download files from S3 to default location.

      Then you can set the working mode to S3 + keep local file and run the tool again to upload the files to S3 again.
       
  10. KISS

    KISS New Member

    Ok that's helpful! I would do it wrong if you didn't mention.

    I realised that if I delete the attachment (before I submit post), the attachment still stays on the remote server. Is this something the add-on can control, to remove deleted attachments (whether user deletes before submit or the admin deletes the attachment after submission, maybe because it is outdated) so that they take up less space?

    So many questions... thanks for your great and pleasant support :)
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @KISS The add-on will delete the remote file after a period of time. So you don't have to worry about that ;)
       
    2. rogerl

      rogerl New Member

      rogerl @xfrocks How frequent is the cleanup on Amazon S3? The attachments I deleted during my tests are still sitting in the S3 bucket a couple of hours later.
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @rogerl The cron entry runs hourly. Depending on your site traffic (is that a test site or a live site)? It may be delayed a bit.
       
  11. KISS

    KISS New Member

    Thank you xfrocks :)

    I have a side question, not sure if it's possible in xenforo. I want to set special permissions for attachments, so that a particular group of people have privileges to upload attachments that are bigger in size and allow more / different file extensions. How can this be done?

    If I use the resource manager, can I store it on s3 also?
     
  12. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    I'm afraid that will require an add-on.

    Yes.
     
  13. DeltaHF

    DeltaHF New Member

    Thanks for making this much-needed add-on, I think it will work well for my needs. I am about to convert my vB 3 forum over to XenForo and I have a few questions.

    I want to store attachments on my server in a custom location, using that one parameter in the XF config.php (I'm on my phone and don't have the exact name handy. I can look it up later but I presume you know what I'm talking about.). Will this be a problem?

    Also, are the URLs for the attachments re-written to be served directly from the CDN used, or are they still passed through the web server's PHP via some kind of redirect?
     
  14. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    You meant the "externalDataPath" configuration value? It will be used without problem. By default, the value is "data" and if you choose to store attachments in external data, they will be saved to "data/attachment-files". When you change the configuration value to "custom-path" for example, attachments will be saved to "custom-path/attachment-files".

    By default, the direct URLs are used. However, if you enable the enforce permission option the http://domain.com/xenforo/attachments/1 URL will be used, after the permission check user will be redirected to the direct URL.
     
  15. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Scharesoft likes this.
  16. Scharesoft

    Scharesoft New Member

    Thanks for the update!

    I've got an other suggestion for maintaining the file name: It would be great if umlauts in the file name wouldn't be removed, but replaced (ä = ae, ö = oe, ü = ue and ß = ss).
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Scharesoft This may be added in the future.
       
  17. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  18. rogerl

    rogerl New Member

    It is a live and busy site and some but not all of the deleted files remained on S3 today.

    I have cleared the S3 bucket down and will do some more testing and report back if I continue to see problems.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @rogerl Please keep me updated, thank you.
       
  19. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  20. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    1. rogerl

      rogerl New Member

      rogerl @xfrocks Is there a reason why the default value for the $filename argument [$filename = false ] has been dropped from the saveFile function in \Model\File.php in the latest version?

      The Xengallery addon by sonnb doesn't pass this argument and fails with the new version as there is no default.
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @rogerl Mostly to simplify the method saveFile for easy extension. Basically the idea is the method should only contain one switch to external/s3/ftp method. Didn't aware that other add-on use this method so I dropped the default value to make it simpler. Probably need to ask @sonnb to update his add-on... Sorry for the problem though.
       
      sonnb likes this.
      1
Loading...