original_string: public static function processFileUpload($file, $mime) {
      if (!$file) return array();
      if (substr($file, 0, 1) != '@') {
        $file = '@' . $file;
      }
  
      // This is a standard file upload with curl.
      $params = array('postBody' => array('file' => $file));
      if ($mime) {
        $params['content-type'] = $mime;
      }
  
      return $params;
    }
code: public static function processFileUpload($file, $mime) {
      if (!$file) return array();
      if (substr($file, 0, 1) != '@') {
        $file = '@' . $file;
      }
  
      // This is a standard file upload with curl.
      $params = array('postBody' => array('file' => $file));
      if ($mime) {
        $params['content-type'] = $mime;
      }
  
      return $params;
    }
code_tokens: public static function processFileUpload ( $ file , $ mime ) { if ( ! $ file ) return array ( ) ; if ( substr ( $ file , 0 , 1 ) != '@' ) { $ file = '@' . $ file ; } // This is a standard file upload with curl. $ params = array ( 'postBody' => array ( 'file' => $ file ) ) ; if ( $ mime ) { $ params [ 'content-type' ] = $ mime ; } return $ params ; }
docstring: Prepares a standard file upload via cURL.
  @param $file
  @param $mime
  @return array Includes the processed file name.
  @visible For testing.
docstring_tokens: Prepares a standard file upload via cURL .