Skip to content

Instantly share code, notes, and snippets.

@nmackenzie
Last active December 24, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmackenzie/6774359 to your computer and use it in GitHub Desktop.
Save nmackenzie/6774359 to your computer and use it in GitHub Desktop.
WAMS code fragment
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