Created
June 22, 2010 16:02
-
-
Save matthewfitz/448667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function putImage($file,$uri) { | |
$fp = fopen($file, "rb"); | |
$filesize = filesize($file); | |
$info = getimagesize($file); | |
$input = $this->inputResource($fp, $filesize); | |
$requestHeaders = array('Content-Type' => $info['mime']); | |
if ($this->putObject($input, $this->_bucketName, $uri, \Amazon\S3::ACL_PUBLIC_READ, array(), $requestHeaders)) { | |
return TRUE; | |
} | |
return FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment