コード例 #1
0
        public bool SaveToken(string userName, string userId, HttpPostedFileBase file)
        {
            var fileGuid = Guid.NewGuid();

            // Add the file to Azure Table storage
            TableStorageService.AddItem(fileGuid, file.FileName, file.ContentType, $"File size: {file.ContentLength}",
                                        DateTime.Now, userName, userId);

            // Add the file to Azure Blob storage
            BlobStorageService.LoadContentsToStorage(fileGuid.ToString(), Functions.ImageHelper.ToJpeg(file));

            return(true);
        }