我有这样的代码声明:
if ($_POST) {
//specify folder for file upload
$folder = dirname($_POST['file']);
//specify redirect URL
$redirect = "upload.php?success";
//upload the file
//
// Create blob REST proxy.
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);
$content = $folder;
$blob_name = $_POST['name'];
try {
//Upload blob
$blobRestProxy->createBlockBlob("mis112", $blob_name, $content);
}
catch(ServiceException $e){
// Handle exception based on error codes and messages.
// Error codes and messages are here:
// http://msdn.microsoft.com/en-us/library/windowsazure/dd179439.aspx
$code = $e->getCode();
$error_message = $e->getMessage();
echo $code.": ".$error_message."<br />";
}
//
//do whatever else needs to be done (insert information into database, etc...)
//redirect user
header('Location: '.$redirect); die;
}
//
?>
我想将blob上传到名为&#34; mis112&#34;的容器中。
使用这段代码,它首先开始工作,我在容器中看到了我的blob&#34; mis112&#34;。
但是第二次,即使上传后我收到了成功的消息,我也无法在天蓝色容器中看到我的blob。
它有什么问题?
我该如何解决问题?
感谢。