Early look at Rails ActiveStorage

I took an early peek at the new Active Storage project in Rails 5.2. It is a built-in solution to handling uploads, something that is all to common in web applications. Also something that is covered by quite a few gems, CarrierWave, PaperClip and Refile for example. These are just the ones I know off the top of my head. At times I have also handled uploads without gems, it’s not that difficult and didn’t warrant the inclusion of another gem for those projects. »

Uploading to Google Cloud Storage using Arc and Phoenix

In this post I will demonstrate how to upload to Google Cloud Storage using Arc and Arc.Ecto in Phoenix. There are several examples on how to use Arc in combination with S3 or local file uploads but the GCS integration is a bit more unknown. I assume you have an up to date elixir installation and know your way around Phoenix and GCS. mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez mix phx.new web --no-brunch Follow instructions to configure your postgres credentials in config/dev. »

Dynamic image resizing with Google Cloud Functions

For a small project I needed dynamic image resizing, meaning I would call an image in an url, append some parameters for resizing and return a smaller image, so something like example.com/image.jpg?w=50&h=50. Now there are several open source projects capable of doing that, most notably Thumbor. However, I wanted to try something new. I recently dabbled a little with Google Cloud Functions and it seemed like a good candidate. However, I feared the initial spin-up time of the functions might be problematic. »