Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def video_file=(input_data)
- unless input_data.to_s.empty?
- newfile = File.open("#{RAILS_ROOT}/public/to_upload/#{self.filename}_vid.f4v", "wb") do |f|
- while buff = input_data.read(4096)
- f.write(buff)
- end
- end
- end
- end
- ActiveRecord::StatementInvalid in <ControllerName>
- newfile = File.open(path, "wb") do |f|
- while buff = input_data.read(4096)
- f.write(buff)
- end
- if input_data.respond_to?(:read)
- File.open(path, "wb") { |f| f.write(input_data.read) }
- end
Add Comment
Please, Sign In to add comment