Class: ActiveStorage::HotCell::Server::Operation

Inherits:
HotCell::Operation
  • Object
show all
Defined in:
lib/active_storage/hot_cell/server/operation.rb

Overview

What every operation in this gem shares, whichever toolchain performs it.

Direct Known Subclasses

MagickOperation, ToolOperation, VipsOperation

Constant Summary collapse

CONTENT_TYPES =

A lookup, not a gate: which format a caller may ask for is decided by the toolchain's own build, the way Rails decides it. This only names the content type in a result, and a format it has never heard of gets none.

{
  "png"  => "image/png",
  "jpg"  => "image/jpeg",
  "jpeg" => "image/jpeg",
  "webp" => "image/webp",
  "gif"  => "image/gif",
  "avif" => "image/avif",
  "tiff" => "image/tiff",
}.freeze