示例#1
0
 /**
  * Return an array of posted/put files or POST stream within HTTP request Body
  * 
  * @param string $uploadDirectory - Upload directory
  * 
  * @return array
  * @throws Exception
  */
 public static function readInputData($uploadDirectory)
 {
     /*
      * No file is posted - check HTTP request body
      */
     if (count($_FILES) === 0) {
         return RestoUtil::readStream();
     } else {
         return RestoUtil::readFile($uploadDirectory);
     }
 }