Development System

From Cloudrexx Development Wiki
Jump to: navigation, search

Server's Upload-File-Size limitation

FWSystem::getMaxUploadFileSize()

Returns the maximum supported file size to be uploaded through a POST interface.

Convert byte size into literal representation

FWSystem::getLiteralSizeFormat()

Returns the literal representation of a byte size

// This will output "1 KB"
print FWSystem::getLiteralSizeFormat(1024);

Convert literal representation into byte size

FWSystem::getBytesOfLiteralSizeFormat()

Returns the byte count of a literal byte size representation

// All of the following examples will output "1024"
print FWSystem::getBytesOfLiteralSizeFormat("1 KB");
print FWSystem::getBytesOfLiteralSizeFormat("1 K");
print FWSystem::getBytesOfLiteralSizeFormat("1kb");
print FWSystem::getBytesOfLiteralSizeFormat("1k");