I am trying to get the file size while uploading it using properties.AfterProperties["vti_filesize"].ToString() but it always returns 0 while I am uploading ZIP files.


The "vti_filesize" can get file size for a document file. It is always null or zero when dealing with a folder.

A ZIP file is a zipped folder. Thus, you get the zero value.

| improve this answer | |
  • then what to do to get a zipped file size. – notorious Jan 16 '18 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.