Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.1+

Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.1+

No permission to download
The 2.1 version doesn't need those files as it uses the core composer support. The 2.1 version doesn't even come with a listener to reference those files.

Are you upgrading to the 2.1 version or is this a fresh install?
 
It's a fresh install Mike.

It was totally broken throwing 500 errors with nothing actually being logged until I added those files. Could be that Listener.php isn't needed, but I added that first and still didn't work until I added the Composer.php file.
 
I've just tested on my own site, which was an update from 2.0 to 2.1 and including the addon update.

193257

If I move Composer.php, the site breaks. Moving it back fixes it again.
 
Testing this out on XF2.1 RC1 and it throws a 500 error when adding the config. Values exactly the same in config.php as they are in XF2.0 (and using the 2.1 version of the addon).
Actually, just coming back to this point, emphasis added.

If you say they're exactly the same, does that mean you still have the lines like \XFAws\Composer::autoloadNamespaces(\XF::app()); in your config.php? If so, note that those are in the 2.0.x only section of the description -- you don't do that for 2.1. You really just need the fsAdapters override (after the add-on is installed).
 
Ah, just seen that in the Update section for the addon
193296

Could maybe make it a little clearer on the initial install instructions page for XF2.1, unless I missed something else on the front page :X3:
 
@Mike I saw that the endpoint URL when enable CDN in DigitalOcean is different that the non-cdn endpoint URL. Do i have to change anything when enable cdn?
Also, I want to keep data folder using my own server to host while attachment will serve via DigitalOcean, how can i do it?
 
Last edited:
I moved my /data directory with the --acl-public flag and it works fine. Should I do the same with internal_data/ or can I upload it without the --acl-public flag (i.e. private)?
 
If you're setting this up on an existing site, you will need to manually move your existing files over.
Is it possible to run this addon only for future files? Will the files left on the server still work or is it compulsory to move them all to S3 storage?
 
Is there any other method of moving your files across if you don't have access to the root of your server and can't use s3cmd? Such as on shared hosting?
 
Not really. It’s the quickest and most reliable way to do it in bulk.

You may be able to download them all to your local computer and then use s3cmd on your command line / Terminal to transfer them.
 
Hi,

I hope someone as a good suggestion on how to solve this error:

197782

What I tried to do is follow the instructions to get XenForo to work with our Azure Blob Storage.

I added flysystem-azure-blob-storage and the microsoft blob storage sdk with composer, like this:
197783

And added the adapters to the config.php:

197784

Unfortunately, adding an attachment to a post causes the above-mentioned error.
Any ideas?

Thanks in advance,
Arthur
 
Top Bottom