1
0
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:
Dan Brown
2024-10-30 15:26:23 +00:00
parent b50b7b667d
commit c4ec50d437
12 changed files with 149 additions and 42 deletions

View File

@@ -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