On Thu, Jul 10, 2008 at 01:25:12AM -0700, adam overton wrote:
> is the math of this correct?
> this is what's on the 'upload variables' page: http://www.pmwiki.org/ 
> wiki/PmWiki/UploadVariables#UploadPrefixQuota
> 
>       $UploadMaxSize
>           Maximum size for uploading files (50000 octets by default)
> 
>       Units are in bytes.
>        100K: 100000;
>         1MB: 1000000;
>         1GB: 1000000000;
>         1TB: 1000000000000;
> 
> i'm getting mixed up because I also see notes on the UploadsAdmin  
> page insisting that the following is correct:
> 
>       100K: 102400;
>        1MB: 1048576;
>        1GB: 1073741824;
>        1TB: 1099511627776;
> 
> 
> the math i'm finding on the web is also confirming the latter...
> wondering which one to choose...

It doesn't really matter which interpretation you choose.  Whatever
value is placed in $UploadMaxSize willl be the maximum number
of bytes allowed for an upload.  So, if you set $UploadMaxSize
to 1000000, then the maximum upload size is a million bytes, period.
Whether someone chooses to call that a "megabyte" is irrelevant.

Personally, I've never thought that listing the unit conversions
is all that useful in the documentation pages.  Certainly I would 
never expect to be able to have gigabyte or terrabyte uploads -- 
IIRC, PHP's upload feature can't support it.

Better in each case would probably be to provide examples than 
to try to quote conversion factors:

    $UploadDirQuota = 102400;     # limit uploads to 100K
    $UploadDirQuota = 1048576;    # limit uploads to 1 MB
    $UploadDirQuota = 10485760;   # limit uploads to 10 MB

Pm

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to