Azure storage: Uploaded files with size zero bytes

后端 未结 2 2019
野性不改
野性不改 2021-01-17 07:14

When I upload an image file to a blob, the image is uploaded apparently successfully (no errors). When I go to cloud storage studio, the file is there, but with a size of 0

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-17 07:58

    The Position property of the InputStream of the HttpPostedFileBase had the same value as the Length property (probably because I had another file previous to this one - stupid I think!).

    All I had to do was to set the Position property back to 0 (zero)!

    I hope this helps somebody in the future.

提交回复
热议问题