<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
John and others,<br>
<br>
I didn't ignore this, I just mentally added it to the list without
remembering to reply to you about it! :-/<br>
<br>
I should be able to do hours and days and stuff like that too.<br>
So that it matches with what happens in the code already, can we
agree to use 1024, 1024^2, 1024^3 etc as the K, M and G multiples?<br>
For times I could allow s, h, d, w.<br>
<br>
So the multipliers would be (ignoring case):<br>
k = 1024<br>
m = 1024*1024<br>
g = 1024*1024*1024<br>
s = 1<br>
h = 60*60<br>
d = 60*60*24<br>
w = 60*60*24*7<br>
<br>
Are there any I have missed (I'm avoiding minutes in favour of
megs).<br>
<br>
The syntax would have to change in the preferences.php file where
you chose to use a suffix, as<br>
'maxBytesForDropoff' => <b>24G</b>,<br>
is not valid PHP, it would need to be<br>
'maxBytesForDropoff' => <b>'24G'</b>,<br>
but you would only need the quotes round ones where you chose to use
a suffix.<br>
<br>
Sound okay to everyone?<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div class="moz-cite-prefix">On Tue 17/11/20 19:13, John Thurston
via ZendTo wrote:<br>
</div>
<blockquote type="cite"
cite="mid:WM!2ee72e74a45e143df19c2bbf36a827fb8e3ce6dd5f122e8d17c0774421ee8df942cb6c1d0fa901ee6f85787f3cad9a7b!@mx.jul.es">Computers
are good at doing math. Can we have the option of including units
on some preferences?
<br>
<br>
I'm thinking, particularly, about:
<br>
maxBytesForDropoff
<br>
maxBytesForFile
<br>
maxBytesForChecksum
<br>
maxBytesForEncryption
<br>
<br>
These are currently specified in bytes. This is generally a long
number which is hard to read and easy to stumble over. May we have
the default continue to be "number of bytes" but have it accept an
optional unit-suffix? For example:
<br>
'maxBytesForDropoff' => 25769790582,
<br>
could be specified as:
<br>
'maxBytesForDropoff' => 24G,
<br>
<br>
Old preferences would continue to work, and new preferences would
be easier to read.
<br>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
'Solutions nearly always come from the direction you least expect, which
means there's no point trying to look in that direction because it won't
be coming from there.' - Douglas Adams
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</body>
</html>