API fix - really retrieve gpx file
In the db the data should be something like "api-routes/route_1_1.gpx"
This commit is contained in:
parent
6d82ab8901
commit
7428339d64
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ class RouteController extends Controller
|
||||||
public function downloadGpx($id, $sportId)
|
public function downloadGpx($id, $sportId)
|
||||||
{
|
{
|
||||||
$routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])->first();
|
$routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])->first();
|
||||||
$file = storage_path("{$routeDetail->gpx_path}");
|
$file = storage_path("app/public/{$routeDetail->gpx_path}");
|
||||||
|
|
||||||
return response()->download($file);
|
return response()->download($file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue