admin/jqadm/src/Admin/JQAdm/Product/Download/Standard.php
protected function storeFile( \Psr\Http\Message\UploadedFileInterface $file, $path )
	{
		$fs = $this->getContext()->getFilesystemManager()->get( 'fs-secure' );

		if( $path == null )
		{
			$ext = pathinfo( $file->getClientFilename(), PATHINFO_EXTENSION );
			$hash = md5( $file->getClientFilename() . microtime( true ) );
			$path = sprintf( '%s/%s/%s.%s', $hash[0], $hash[1], $hash, $ext );

			if( !$fs->isdir( $hash[0] . '/' . $hash[1] ) ) {
				$fs->mkdir( $hash[0] . '/' . $hash[1] );
			}
		}

		$fs->writes( $path, $file->getStream()->detach() );

		return $path;
	}
protected function storeFile( \Psr\Http\Message\UploadedFileInterface $file, $path )
	{
		$fs = $this->getContext()->getFilesystemManager()->get( 'fs-secure' );

		if( $path == null )
		{
			$ext = pathinfo( $file->getClientFilename(), PATHINFO_EXTENSION );
			$hash = md5( $file->getClientFilename() . microtime( true ) );
			$path = sprintf( '%s/%s/%s.%s', $hash[0], $hash[1], $hash, $ext );

			if( !$fs->isdir( $hash[0] . '/' . $hash[1] ) ) {
				$fs->mkdir( $hash[0] . '/' . $hash[1] );
			}
		}

		$fs->writes( $path, $file->getStream()->detach() );

		return $path;
	}
protected function storeFile ( \ Psr \ Http \ Message \ UploadedFileInterface $ file , $ path ) { $ fs = $ this -> getContext ( ) -> getFilesystemManager ( ) -> get ( 'fs-secure' ) ; if ( $ path == null ) { $ ext = pathinfo ( $ file -> getClientFilename ( ) , PATHINFO_EXTENSION ) ; $ hash = md5 ( $ file -> getClientFilename ( ) . microtime ( true ) ) ; $ path = sprintf ( '%s/%s/%s.%s' , $ hash [ 0 ] , $ hash [ 1 ] , $ hash , $ ext ) ; if ( ! $ fs -> isdir ( $ hash [ 0 ] . '/' . $ hash [ 1 ] ) ) { $ fs -> mkdir ( $ hash [ 0 ] . '/' . $ hash [ 1 ] ) ; } } $ fs -> writes ( $ path , $ file -> getStream ( ) -> detach ( ) ) ; return $ path ; }
Stores the uploaded file in the "fs-secure" file system

@param \Psr\Http\Message\UploadedFileInterface $file
@param string $path Path the file should be stored at
@return string Path to the uploaded file
Stores the uploaded file in the fs - secure file system