Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.x

Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.x

No permission to download

Hoffi

Well-known member
Is the bucket Name really attachments.mydomain.info ? Above you mentioned it without the plural s?

Normally that works out of the box. Use wanted Subdomain as bucket name and add CNAME. I did this many times, and never had issues.
 

BubbaLovesCheese

Active member
I personally am using two S3 buckets, the default data bucket is public, and the internal is restricted.
But thats not neccesary, afaik the System sets the restriction for internal files that they are not visible to the public.
So, that looks correct, yes. But check if the internal-data is really protected from the public.
Sorry for the german screenshot. But only the top entry should have access.
View attachment 253080

That is a good idea, but I already placed both folders in to the same bucket. The problem I have is that all my folders and files are restricted, both data and internal_data. Even though I un-blocked public assess for the whole bucket. I still can not see them.

I think it may be the way I imported the folder from xenforo. All the individual files (objects) are set to private, so I guess my questions is:
  1. Do I have to go to my s3://xf-bucket/data/ and make all the folders/files public that way?
  2. Because there are 1 million files in the avatars folder, and that will take a long time.
  3. Or is there another global setting I can use?
Thanks.
 

BubbaLovesCheese

Active member
I personally am using two S3 buckets, the default data bucket is public, and the internal is restricted.
But thats not neccesary, afaik the System sets the restriction for internal files that they are not visible to the public.
So, that looks correct, yes. But check if the internal-data is really protected from the public.
Sorry for the german screenshot. But only the top entry should have access.
View attachment 253080

Or would I change something here instead?

ALC.JPG
 

briansol

Well-known member
these are the settings i use:

Block all public access
Off
  • Block public access to buckets and objects granted through new access control lists (ACLs)
    Off
  • Block public access to buckets and objects granted through any access control lists (ACLs)
    Off
  • Block public access to buckets and objects granted through new public bucket or access point policies
    On
  • Block public and cross-account access to buckets and objects through any public bucket or access point policies
    On
 

Hoffi

Well-known member
I assume you copied both folders the same way? That may the reason. You need to copy the data folder with enabling public access.
Note: When copying your existing data files across, they will need to be made public. You can do this by setting the ACL to public while copying:
You need to change this. Esiest and fastes way is, to use the command line tool.
 
Top