public function image() { $image = new Image('http://sinastorage.com/sandbox/test.jpg'); $image->rotate(50); $s3 = new S3(); $result = $s3->plainWrite('test.jpg', $image->getContent(), $image->getSize(), $image->getMimeType()); Common::debug($result); }