Module: Sinatra::Backstage::StoredFile::Helper

Included in:
Sinatra::Backstage::StoredFile
Defined in:
lib/sinatra/backstage/stored_file/stored_file_helper.rb

Instance Method Summary collapse

Instance Method Details

#get_attachment_attrs(attachment) ⇒ Object



6
7
8
9
10
11
# File 'lib/sinatra/backstage/stored_file/stored_file_helper.rb', line 6

def get_attachment_attrs(attachment)
	{
		:filename => attachment[:filename],
		:filesize => File.size(attachment[:tempfile].path)
	}
end