Forem Creators and Builders 🌱

Discussion on: A current update to the TheCloudDev Forem preperation

Collapse
 
djuber profile image
Daniel Uber • Edited

Hopefully the app is using some standard upload gem, and I can just provide configuration to S3.

There are AWS/S3 environment vars for uploaded images and video (This seems separate from any cloudinary dependency) github.com/forem/forem/blob/main/....

Attachments are handled by the gem "carrierwave", and the configuration checks for S3 here github.com/forem/forem/blob/main/c... - basically if you provide an AWS_ID in the environment (and all the rest of the first block) we should upload attachments to the bucket you configure, if we don't see that set we'll fall back to local storage (I think that's going to public/uploads/ but I don't recall where that's mounted in the self-hosted environment). The "forem_cloud_config" is only enabled for Forem hosted sites (like forem.dev), the "standard production config" is identical to our configuration in heroku for DEV.to.

One thing to bear in mind (and possibly this is something we would consider modularizing) - the generated sitemap will stored in the same public S3 bucket as image uploads - this uses the "fog" gem for pushing to S3 (carrierwave is designed to handle image/attachments, fog is a lower level of abstraction for cloud storage) but is effectively doing the same thing.