public function uploadFile($sourcePath, $targetPath, $publicAccess = true, $allowRewriteFile = false)
	{
		// check if the file does not already exists, if exist, don't upload
		if ($allowRewriteFile !== true && $this->isFile($targetPath)) {
			return false;
		}
		return $this->s3Client->putObject(array(
			'Bucket'     => $this->getBucket(),
			'Key'        => $targetPath,
			'SourceFile' => $sourcePath,
			'ACL'        => $publicAccess ? self::PUBLIC_READ : self::PRIVATE_ACCESS
		));
	}
public function uploadFile($sourcePath, $targetPath, $publicAccess = true, $allowRewriteFile = false)
	{
		// check if the file does not already exists, if exist, don't upload
		if ($allowRewriteFile !== true && $this->isFile($targetPath)) {
			return false;
		}
		return $this->s3Client->putObject(array(
			'Bucket'     => $this->getBucket(),
			'Key'        => $targetPath,
			'SourceFile' => $sourcePath,
			'ACL'        => $publicAccess ? self::PUBLIC_READ : self::PRIVATE_ACCESS
		));
	}
public function uploadFile ( $ sourcePath , $ targetPath , $ publicAccess = true , $ allowRewriteFile = false ) { // check if the file does not already exists, if exist, don't upload if ( $ allowRewriteFile !== true && $ this -> isFile ( $ targetPath ) ) { return false ; } return $ this -> s3Client -> putObject ( array ( 'Bucket' => $ this -> getBucket ( ) , 'Key' => $ targetPath , 'SourceFile' => $ sourcePath , 'ACL' => $ publicAccess ? self :: PUBLIC_READ : self :: PRIVATE_ACCESS ) ) ; }
Uploads file to amazon s3
@param  string $sourcePath path name to file on local storage
@param  string $targetPath      path in which would be image saved in S3
@param  bool $allowRewriteFile
@return
Uploads file to amazon s3