Help Center


Amazon S3 configuration

https://app.chaskiq.io/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdXdKIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--1e4bb37de70b822f55f05051b5f11730cf9b0963/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVdscGFRPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--285ee8d1047615771afef258f0db59a0c5726b2a/mich-square-profile.png

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!