mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
ZIP Exports: Got zip format validation functionally complete
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace BookStack\Exports\Controllers;
|
||||
|
||||
use BookStack\Exports\ZipExports\ZipExportValidator;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -26,7 +27,13 @@ class ImportController extends Controller
|
||||
]);
|
||||
|
||||
$file = $request->file('file');
|
||||
$file->getRealPath();
|
||||
$zipPath = $file->getRealPath();
|
||||
|
||||
$errors = (new ZipExportValidator($zipPath))->validate();
|
||||
if ($errors) {
|
||||
dd($errors);
|
||||
}
|
||||
dd('passed');
|
||||
// TODO - Read existing ZIP upload and send through validator
|
||||
// TODO - If invalid, return user with errors
|
||||
// TODO - Upload to storage
|
||||
|
Reference in New Issue
Block a user