Last active
December 24, 2015 08:59
-
-
Save nmackenzie/6774359 to your computer and use it in GitHub Desktop.
WAMS code fragment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String pathToFile = PATH_TO_MEDIA_FILE; | |
String fileName = Path.GetFileName(pathToFile); | |
String assetName = "SOME ASSET NAME"; | |
CloudMediaContext context = new CloudMediaContext( | |
ACCOUNT_NAME, ACCOUNT_KEY); | |
IAsset asset = context.Assets.Create( | |
assetName, AssetCreationOptions.None); | |
IAssetFile assetFile = asset.AssetFiles.Create(fileName); | |
assetFile.Upload(pathToFile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment