Гавно

This commit is contained in:
Dhaverd 2024-06-17 12:51:56 +03:00
parent 32abf4ad92
commit 80178a97a2
3 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ use Illuminate\Http\Request;
class DownloadController extends Controller
{
public function download($file_name) {
$file_path = public_path('/'.$file_name);
$file_path = public_path('/'.'downloads/'.$file_name);
return response()->download($file_path);
}
}

View File

@ -18,4 +18,4 @@ Route::get('/', function () {
});
Route::get('/download_api', 'App\Http\Controllers\YoutubeDownloadController@index');
Route::get('/download/{file}', 'App\Http\Controllers\DownloadController@index');
Route::get('/download/{file}', 'App\Http\Controllers\DownloadController@download');