Azure存储图像上载无法正常工作

时间:2015-03-12 01:09:13

标签: php azure

我遇到Azure存储问题,我不是100%确定如何修复它。我需要能够拍摄图像并将其上传到容器中。这是我第一次使用Azure存储。以下是一些代码:

require_once 'vendor\autoload.php';
require_once 'WindowsAzure\WindowsAzure.php';
use WindowsAzure\Common\ServicesBuilder;
$connectionString = 'DefaultEndpointsProtocol=http;AccountName=buyeraudit;AccountKey=MYKEY';
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);

这是另一部分:

$newFileName = $pro[0]['proid'] .'.'. $picExt;
rename($_FILES['pic']['tmp_name'], $newFileName);
$blobRestProxy->createBlockBlob("images", $newFileName,  file_get_contents($_FILES['pic']['name']));

我只是设置了sdk,所以它也可能是一个与此有关的问题。我感谢所有的帮助,并感谢您的帮助。

0 个答案:

没有答案