diff --git a/app/Http/Controllers/Server/ServerController.php b/app/Http/Controllers/Server/ServerController.php index f755d3f1e..f6afca4c6 100644 --- a/app/Http/Controllers/Server/ServerController.php +++ b/app/Http/Controllers/Server/ServerController.php @@ -143,7 +143,7 @@ class ServerController extends Controller } Alert::danger($exception)->flash(); - return redirect()->route('files.index', $uuid); + return redirect()->route('server.files.index', $uuid); } diff --git a/app/Http/Routes/ServerRoutes.php b/app/Http/Routes/ServerRoutes.php index 095deedf8..9707d4447 100644 --- a/app/Http/Routes/ServerRoutes.php +++ b/app/Http/Routes/ServerRoutes.php @@ -60,22 +60,22 @@ class ServerRoutes { // File Manager Routes $router->get('/files', [ - 'as' => 'files.index', + 'as' => 'server.files.index', 'uses' => 'Server\ServerController@getFiles' ]); $router->get('/files/edit/{file}', [ - 'as' => 'files.edit', + 'as' => 'server.files.edit', 'uses' => 'Server\ServerController@getEditFile' ])->where('file', '.*'); $router->get('/files/download/{file}', [ - 'as' => 'files.download', + 'as' => 'server.files.download', 'uses' => 'Server\ServerController@getDownloadFile' ])->where('file', '.*'); $router->get('/files/add', [ - 'as' => 'files.add', + 'as' => 'server.files.add', 'uses' => 'Server\ServerController@getAddFile' ]); diff --git a/resources/views/server/files/add.blade.php b/resources/views/server/files/add.blade.php index 7c5dc29ce..c6816e2e8 100644 --- a/resources/views/server/files/add.blade.php +++ b/resources/views/server/files/add.blade.php @@ -186,7 +186,7 @@ $(window).load(function () { $("#create_file").append(' ').addClass("disabled"); $.ajax({ type: 'POST', - url: '/server/{{ $server->uuidShort }}/ajax/files/save', + url: '{{ route('server.files.save', $server->uuidShort) }}', headers: { 'X-CSRF-Token': '{{ csrf_token() }}' }, data: { file: '{{ $directory }}' + $('#file_name').val(),