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;
  }
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;
  }
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 ; }
Prepares a standard file upload via cURL.
@param $file
@param $mime
@return array Includes the processed file name.
@visible For testing.
Prepares a standard file upload via cURL .