public function write($key, $content)
{
$resource = tmpfile();
fwrite($resource, $content);
fseek($resource, 0);
try {
$this->client->putFile($key, $resource);
} catch (\Exception $e) {
fclose($resource);
throw $e;
}
fclose($resource);
return Util\Size::fromContent($content);
}