Uploading files in the AgileDev book?

The Agile Development book uses the following code to turn a file name string into something that can be read as a file:

class Picture<ActiveRecord::Base
  def picture=(picture_field)

  def base_part_of(file_name)

Can anyone explain what's going on here? Where is original_filename defined? Is there a less obscure way to perform a read on a filename that refers to a file on the visitor's disk?