asp.net file size

后端 未结 4 1227
一个人的身影
一个人的身影 2021-01-24 07:51

I want to get the file size before uploading to server. I used following code

Dim fileDetails As IO.FileInfo
fileDetails = My.Computer.FileSystem.GetFileInfo(fil         


        
4条回答
  •  天命终不由人
    2021-01-24 08:17

    You can't access the client file system from an ASP.NET page, so you'll need upload the file before checking its size and rejecting it if it's too big.

提交回复
热议问题