โ€”

title: Shrine 2.11.0

New features

uploaded_file.stream(StringIO.new)
# or
uploaded_file.stream("/path/to/destination")
add_metadata do |io, context|
  movie = Shrine.with_file(io) { |file| FFMPEG::Movie.new(file.path) }

  { "duration"   => movie.duration,
    "bitrate"    => movie.bitrate,
    "resolution" => movie.resolution,
    "frame_rate" => movie.frame_rate }
end

Other improvements

Regressions

Backwards compatibility