For bigger files, your method of using one million will
really throw the reported number way off.  Say you gave
someone the option to upload a 10Mb file on a web server
and it was only about 9.9Mb. Your function would report
that it was too big and not allow it. It's really not a good
estimate at all. 1024 * 1024 will get you the number you need
and is precise.

Chris Tifer
http://www.emailajoke.com


----- Original Message -----
From: "jake williamson" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 7:50 AM
Subject: sorted! Re: showing file size in meg


wow!

thanks for the responses - each works and it's good to see the
different ways codes put together (it's like photoshop - theres a
million different ways of achieving the same thing, it's finding the
one thats good for you!)

the one i've gone for (for this project) is:

<%=FormatNumber(objFile.Size/1000000, 2)%>

works a treat.

thanks out there,

jake

---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to