You are here

function qqUploadedFileXhr::getSize in TinyBrowser 7

1 call to qqUploadedFileXhr::getSize()
qqUploadedFileXhr::save in tinybrowser/fileuploader.php
Save the file to the specified path

File

tinybrowser/fileuploader.php, line 69

Class

qqUploadedFileXhr
Handle file uploads via XMLHttpRequest

Code

function getSize() {
  if (isset($_SERVER["CONTENT_LENGTH"])) {
    return (int) $_SERVER["CONTENT_LENGTH"];
  }
  else {
    throw new Exception('Getting content length is not supported.');
  }
}