Beispiel #1
0
 private static BlobService GetInstance()
 {
     if (_instance == null)
     {
         _instance = new BlobService(Common.GetStorageAccount());
     }
     return(_instance);
 }
Beispiel #2
0
        public int EditUser(Stream userPhoto, MultipartFormDataStreamProvider formParams)
        {
            ApplicationUser appUser = new ApplicationUser()
            {
                Id            = formParams.FormData["Id"],
                Name          = formParams.FormData["Name"],
                Email         = formParams.FormData["Email"],
                BirthDate     = DateTime.Parse(formParams.FormData["BirthDate"]),
                WalletAddress = formParams.FormData["WalletAddress"],
                State         = formParams.FormData["State"],
                Country       = formParams.FormData["Country"]
            };

            var imageUrl = BlobService.GetUploadedFile("wealthshare", formParams.FormData["Id"], userPhoto, formParams.FormData["contentType"]);

            appUser.ImgUrl = imageUrl;

            return(Ar.EditUserWithPhoto(appUser));
        }