Help Center


Amazon S3 configuration

https://app.chaskiq.io/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbXdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--827f2d0b5794f7bb660c48b79e228655bd857bed/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVdscGFRPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--cf24ea7784b3789671bb09c4029aca003c26b32d/me.jpg

Written by Miguel Michelson

updated

For file storage to work, mainly for file uploads (images, videos & files) you will need to setup an Amazon S3 bucket and configure properly on your env vars.
Here, the tricky part is that you will need to configure the Amazon bucket to permit direct uploads, so the Chaskiq platform will be able to upload files directly from the browser.
For this to happen you need to enter the Amazon console , go to bucket and look for the CORS policies on the permissions tab

[
 {
   "AllowedHeaders": [ "Authorization"],        
   "AllowedMethods": ["GET"],        
   "AllowedOrigins": ["*" ],        
   "ExposeHeaders": [],        
   "MaxAgeSeconds": 3000   
 },    
 {        
    "AllowedHeaders": ["*"],        
    "AllowedMethods": [ "PUT", "POST"],        
    "AllowedOrigins": ["*"],        
    "ExposeHeaders": [],        
    "MaxAgeSeconds": 3000    
  }
]

Then look for this article in which it shows the policy format:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html

That's all , have a happy uploading!