private void SaveSignature(Favorate[] favorates, string signature)
        {
            var container = GetContainer();

            var blockBlob = container.GetBlockBlobReference(Guid.NewGuid().ToString() + ".png");
            var bytes = Convert.FromBase64String(signature.Split(',')[1]);
            //var blockBlob = container.GetBlockBlobReference("aaaa.mp4");
            var stream = new MemoryStream(bytes);
            var ints = favorates.Select(x => x._id);
            blockBlob.Metadata["Favorates"] = JsonConvert.SerializeObject(ints);
            blockBlob.UploadFromStream(stream);

            Thread.Sleep(5000);
            var service = new NotificationService();
            service.SendNotification(NotificationsController.DeviceIds, "已收到訂單!");
        }
 public ActionResult UploadFavorates(Favorate[] favorates, string signature)
 {
     SaveSignature(favorates, signature);
     return Json(new { favorates = favorates, signature = signature });
 }