浏览代码

返回文件名

locky 3 年之前
父节点
当前提交
9c50f79a31
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Controller/EquipmentOTA.py

+ 2 - 0
Controller/EquipmentOTA.py

@@ -366,8 +366,10 @@ class EquipmentVersionView(View):
         if now_ver > max_ver:
             return response.json(902)
         url = SERVER_DOMAIN + 'OTA/downloadsPack/' + file_path
+        file_name = file_path[file_path.rindex('/')+1:]
         res = {
             "url": url,
+            "fileName": file_name,
             "fileSize": equipment.fileSize,
             "Description": equipment.Description,
             "softwareVersion": equipment.softwareVersion