Correct. Yes. For your existing files, you can move them to S3 if you want. There is a tool bundled with the add-on.
@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)
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).
xfrocks updated [bd] Attachment Store with a new update entry: Minor feature update Read the rest of this update entry...
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.
xfrocks @mattdewald Currently no. In the foreseeable future, unlikely. But I may try to do that sometime because that's what I want too.
I'm sorry, but I don't understand what "set private access" is. Can you explain with an scenario? Thank you!
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
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!
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.
This may sound dumb but I'm new to xenforo. The rebuild tool is it the one under Tools > Rebuild Attachment Data Storage?
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.
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
xfrocks @KISS The add-on will delete the remote file after a period of time. So you don't have to worry about that
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.
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.
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?
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?
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.
xfrocks updated [bd] Attachment Store with a new update entry: Minor update Read the rest of this update entry...
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).
xfrocks updated [bd] Attachment Store with a new update entry: Hotfix Read the rest of this update entry...
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.
xfrocks updated [bd] Attachment Store with a new update entry: Minor update Read the rest of this update entry...
xfrocks updated [bd] Attachment Store with a new update entry: Hot fix v1.0.0b Read the rest of this update entry...
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.
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.