Compare commits

...

2 Commits

Author SHA1 Message Date
Dhaverd 429f77cfe1 Гавно 2024-06-17 12:52:39 +03:00
Dhaverd 80178a97a2 Гавно 2024-06-17 12:51:56 +03:00
2 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');