MatisseComponents/Dropzone.php
static function dropzoneUpload ($request, $response)
  {
    $ds = DIRECTORY_SEPARATOR;
    $storeFolder = self::TEMP_STORE_FOLDER_NAME;
    $storePath = sys_get_temp_dir().$ds.$storeFolder;

    if (!is_dir($storePath))
      mkdir($storePath);

    $file = "";
    foreach ($request->getUploadedFiles() as $oFile)
    {
      $filename = $oFile->getClientFilename ();
      $filePath = $storePath.$ds.$filename;
      $oFile->moveTo($filePath);
      $file = $filePath;
    }
    return Http::jsonResponse ($response,$file);
  }
static function dropzoneUpload ($request, $response)
  {
    $ds = DIRECTORY_SEPARATOR;
    $storeFolder = self::TEMP_STORE_FOLDER_NAME;
    $storePath = sys_get_temp_dir().$ds.$storeFolder;

    if (!is_dir($storePath))
      mkdir($storePath);

    $file = "";
    foreach ($request->getUploadedFiles() as $oFile)
    {
      $filename = $oFile->getClientFilename ();
      $filePath = $storePath.$ds.$filename;
      $oFile->moveTo($filePath);
      $file = $filePath;
    }
    return Http::jsonResponse ($response,$file);
  }
static function dropzoneUpload ( $ request , $ response ) { $ ds = DIRECTORY_SEPARATOR ; $ storeFolder = self :: TEMP_STORE_FOLDER_NAME ; $ storePath = sys_get_temp_dir ( ) . $ ds . $ storeFolder ; if ( ! is_dir ( $ storePath ) ) mkdir ( $ storePath ) ; $ file = "" ; foreach ( $ request -> getUploadedFiles ( ) as $ oFile ) { $ filename = $ oFile -> getClientFilename ( ) ; $ filePath = $ storePath . $ ds . $ filename ; $ oFile -> moveTo ( $ filePath ) ; $ file = $ filePath ; } return Http :: jsonResponse ( $ response , $ file ) ; }
Handles file uploads.

@param ServerRequestInterface $request
@param ResponseInterface      $response
@return ResponseInterface
@internal param ContentRepositoryInterface $repository
Handles file uploads .