Update temp static battery images with new ones, handle spaces in image path #746
This commit is contained in:
parent
18c893cc6e
commit
570d405347
4 changed files with 1 additions and 0 deletions
BIN
public/battery/enduro_mobile.jpg
Normal file → Executable file
BIN
public/battery/enduro_mobile.jpg
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
BIN
public/battery/excel_mobile.jpg
Normal file → Executable file
BIN
public/battery/excel_mobile.jpg
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
public/battery/gold_mobile.jpg
Normal file → Executable file
BIN
public/battery/gold_mobile.jpg
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -144,6 +144,7 @@ class ApiController extends BaseApiController
|
||||||
{
|
{
|
||||||
// TODO: workaround for now, we get static image of battery based on model name
|
// TODO: workaround for now, we get static image of battery based on model name
|
||||||
$filename = trim(strtolower($batt->getModel()->getName())) . '_mobile.jpg';
|
$filename = trim(strtolower($batt->getModel()->getName())) . '_mobile.jpg';
|
||||||
|
$filename = str_replace(" ", "_", $filename);
|
||||||
$file_path = $req->getSchemeAndHttpHost() . $this->generateUrl('static_battery_image') . '/' . $filename;
|
$file_path = $req->getSchemeAndHttpHost() . $this->generateUrl('static_battery_image') . '/' . $filename;
|
||||||
|
|
||||||
return $file_path;
|
return $file_path;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue