file size

  • Thread starter Thread starter Eugene Anthony
  • Start date Start date
E

Eugene Anthony

The code bellow makes up part of my upload script build using asp.net
with c#:

string filename =
FileUpload1.PostedFile.FileName.Substring(FileUpload1.PostedFile.FileNam
e.LastIndexOf("\\") + 1);
string filetype = FileUpload1.PostedFile.ContentType;
int filesize = FileUpload1.PostedFile.ContentLength;

However I am facing a problem in terms of the filesize. It is not
accurate or the same as the actual file size. Huge difference in figure.
How do I find out the actual file size in kilobytes?

Eugene Anthony
 
The code bellow makes up part of my upload script build using asp.net
with c#:

string filename =
FileUpload1.PostedFile.FileName.Substring(FileUpload1.PostedFile.FileNam
e.LastIndexOf("\\") + 1);
string filetype = FileUpload1.PostedFile.ContentType;
int filesize = FileUpload1.PostedFile.ContentLength;

However I am facing a problem in terms of the filesize. It is not
accurate or the same as the actual file size. Huge difference in figure.
How do I find out the actual file size in kilobytes?

Eugene Anthony

*** Sent via Developersdexhttp://www.developersdex.com***

1 kilobyte = 1024 bytes
filesize / 1024
 
Back
Top