Update temp static battery images with new ones, handle spaces in image path #746

This commit is contained in:
Ramon Gutierrez 2023-07-24 15:36:49 +08:00
parent 18c893cc6e
commit 570d405347
4 changed files with 1 additions and 0 deletions

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

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -144,6 +144,7 @@ class ApiController extends BaseApiController
{
// TODO: workaround for now, we get static image of battery based on model name
$filename = trim(strtolower($batt->getModel()->getName())) . '_mobile.jpg';
$filename = str_replace(" ", "_", $filename);
$file_path = $req->getSchemeAndHttpHost() . $this->generateUrl('static_battery_image') . '/' . $filename;
return $file_path;