public function __construct($upToken, $key, $inputStream, $size, $params, $mime, $config)
{
$this->upToken = $upToken;
$this->key = $key;
$this->inputStream = $inputStream;
$this->size = $size;
$this->params = $params;
$this->mime = $mime;
$this->contexts = array();
$this->config = $config;
list($upHost, $err) = $config->zone->getUpHostByToken($upToken);
if ($err != null) {
throw new \Exception($err, 1);
}
$this->host = $upHost;
}