use File.read in attachment