![]() ![]() ![]() The code that calls the SetContent method seems to be exactly the same and file seems to be correct since a new file with zero bytes is created at the correct location.ĭoes any one have any suggestion please? I debugged this code dozens of times and I cannot see the problem.It seems to be mostly PUPs and Adware though but I’m just worried about it because I didn’t even run the. HttpPostedFileBase newFile = Request.Files as HttpPostedFileBase ĬontentService service = new ContentService() īlog.Image = service.UploadFile(newFile, string.Format("",, blog.RowKey)) īefore the image file is uploaded to the storage, the Property InputStream from the HttpPostedFileBase appears to be fine (the size of the of image corresponds to what is expected! And no exceptions are thrown).Īnd the really strange thing is that this works perfectly in other cases (uploading Power Points or even other images from the Worker role). The above code is called by this code. Int indexBar = ('\\') įilename = + (indexBar + 1) įilename = + file.FileName Ĭ(file, Helper.CombinePath(uploadPath, filename), true) Public string UploadFile(HttpPostedFileBase file, string uploadPath) Var blob = blobContainer.GetBlobReference(filename) ī = file.ContentType ī = "application/octet-stream" ![]() Public void SetContent(HttpPostedFileBase file, string filename, bool overwrite)ĬloudBlobContainer blobContainer = GetContainer() The following is the code that I am using: // These two methods belong to the ContentService class used to upload When I go to cloud storage studio, the file is there, but with a size of 0 (zero) bytes. When I upload an image file to a blob, the image is uploaded apparently successfully (no errors). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |