iboboc / relay

Automatically exported from code.google.com/p/relay
MIT License
0 stars 0 forks source link

Uploading files > 10k failed #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Looks like the json returned from relay.php formats floating point numbers 
incorrectly, therefore the json became invalid.

0.10 was formatted as 0,10. Inserting the number_format to correctly format the 
numbers solved the problem. Uploading works fine now!
Hopefully this suggestion makes in to the next release!

Changed line 574 in relay.php:

jsonAdd("\"percent\": ".number_format($percent,2,'.','').", \"size\": 
\"".number_format($size,2,'.','')."\",\"percentSec\": 
".number_format($percentSec,2,'.','').", \"speed\": 
\"".number_format($speed,2,'.','')."\", \"secondsLeft\": 
\"".number_format($secondsLeft,2,'.','')."\", \"done\": \"$done\"");

Original issue reported on code.google.com by bike4l...@gmail.com on 11 Oct 2012 at 8:24