/// <summary>
/// Notify the backend that a new file was uploaded
/// by sending a queue message.
/// </summary>
/// <param name="value">The name of the blob to be processed</param>
/// <returns>Void</returns>
public async Task Post(CompleteRequest item)
{
string owner = ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier).Value;
//Get the owner name field
string ownerName = ClaimsPrincipal.Current.FindFirst("name").Value;
//Replace any commas with periods
ownerName = ownerName.Replace(',', '.');
string message = string.Format(
"{0},{1},{2},{3}, {4}, {5}, {6}",
item.ID,
item.ServerFileName,
item.StorageAccountName,
owner,
ownerName,
item.BlobURL,
SettingsHelper.CurrentRegion);
//Send a queue message to the local storage account
//The local web job will pick it up and broadcast to
//all storage accounts in appSettings prefixed with "Storage"
var repo = new StorageRepository(SettingsHelper.LocalStorageConnectionString);
await repo.SendBroadcastQueueMessageAsync(message);
}