protected function setFilename() {
    if (is_object($this->file)) {
      if (!isset($this->file->{$this->filename_field})) {
        return FALSE;
      }

      $this->file_name = $this->file->{$this->filename_field};
      return TRUE;
    }

    if (is_array($this->file)) {
      $this->file_name = $field[$this->filename_field];
      return TRUE;
    }

    if (is_string($this->file)) {
      $this->file_name = $this->file;
      return TRUE;
    }

    return FALSE;
  }