Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Minor fixes for Media Services samples (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqiyang committed May 31, 2016
1 parent ba6f2a8 commit 0a29457
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/MediaServices/vodworkflow_aes.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function uploadFileAndCreateAsset($restProxy, $mezzanineFileName)
{
// 1.1. create an empty "Asset" by specifying the name
$asset = new Asset(Asset::OPTIONS_NONE);
$asset->setName('Mezzanine '.$mezzanineFileName);
$asset->setName('Mezzanine ' . basename($mezzanineFileName));
$asset = $restProxy->createAsset($asset);
$assetId = $asset->getId();

Expand All @@ -125,7 +125,7 @@ function uploadFileAndCreateAsset($restProxy, $mezzanineFileName)
echo "Uploading...\r\n";

// 1.6. use the 'uploadAssetFile' to perform a multi-part upload using the Block Blobs REST API storage operations
$restProxy->uploadAssetFile($sasLocator, $mezzanineFileName, $fileContent);
$restProxy->uploadAssetFile($sasLocator, basename($mezzanineFileName), $fileContent);

// 1.7. notify Media Services that the file upload operation is done to generate the asset file metadata
$restProxy->createFileInfos($asset);
Expand Down
4 changes: 2 additions & 2 deletions examples/MediaServices/vodworkflow_drm_playready_widevine.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function uploadFileAndCreateAsset($restProxy, $mezzanineFileName)
{
// 1.1. create an empty "Asset" by specifying the name
$asset = new Asset(Asset::OPTIONS_NONE);
$asset->setName('Mezzanine '.$mezzanineFileName);
$asset->setName('Mezzanine ' . basename($mezzanineFileName));
$asset = $restProxy->createAsset($asset);
$assetId = $asset->getId();

Expand All @@ -134,7 +134,7 @@ function uploadFileAndCreateAsset($restProxy, $mezzanineFileName)
echo "Uploading...\r\n";

// 1.6. use the 'uploadAssetFile' to perform a multi-part upload using the Block Blobs REST API storage operations
$restProxy->uploadAssetFile($sasLocator, $mezzanineFileName, $fileContent);
$restProxy->uploadAssetFile($sasLocator, basename($mezzanineFileName), $fileContent);

// 1.7. notify Media Services that the file upload operation is done to generate the asset file metadata
$restProxy->createFileInfos($asset);
Expand Down

0 comments on commit 0a29457

Please sign in to comment.