protected function storeFile( \Psr\Http\Message\ServerRequestInterface $request, &$clientFilename = '' )
	{
		$context = $this->getContext();
		$files = (array) $request->getUploadedFiles();

		if( ( $file = reset( $files ) ) === false || $file->getError() !== UPLOAD_ERR_OK ) {
			throw new \Aimeos\Controller\ExtJS\Exception( 'No file was uploaded or an error occured' );
		}

		$clientFilename = $file->getClientFilename();
		$fileext = pathinfo( $clientFilename, PATHINFO_EXTENSION );
		$dest = md5( $clientFilename . time() . getmypid() ) . '.' . $fileext;

		$fs = $context->getFilesystemManager()->get( 'fs-admin' );
		$fs->writes( $dest, $file->getStream()->detach() );

		return $dest;
	}