Encoding
require 'base64'data = File.open('/home/name/folder/sample-video.mp4').readencoded = Base64.encode64(data)