Пример #1
0
 /**
  * add a file in the url blob
  * @param type $path 
  * @param type $url
  * @return boolean
  */
 public function addBlob($url, $path)
 {
     try {
         $dir = $this->getContainer($url);
         $file = $this->getBlobName($url);
     } catch (Exception $ex) {
         echo $ex->getMessage();
     }
     try {
         return parent::copyInBlob($dir, $file, $path);
     } catch (ServiceException $e) {
         // Handle exception based on error codes and messages.
         // Error codes and messages are here:
         // http://msdn.microsoft.com/it-it/library/windowsazure/dd179439.aspx
         $code = $e->getCode();
         $error_message = $e->getMessage();
         echo $code . ": " . $error_message . "<br />";
         return false;
     }
 }
Пример #2
0
 /**
  * Copy file
  * @param type $dest_dir the container
  * @param type $dest_blob the blob
  * @param type $local_file 
  * @return boolean
  */
 public function copy($dest_dir, $dest_blob, $local_file)
 {
     return parent::copyInBlob($dest_dir, $dest_blob, $local_file);
 }