Browse Source

添加设备音频优化

linhaohong 5 tháng trước cách đây
mục cha
commit
6cde0ef77c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      AdminController/DeviceManagementController.py

+ 2 - 2
AdminController/DeviceManagementController.py

@@ -1798,12 +1798,12 @@ class DeviceManagement(View):
             }
             if uid and classification == 1:
                 voice_prompt_dict["uid"] = uid
-                obj = 'voice_prompt/system/' + filename
+                obj = 'voice_prompt/{uid}/{channel}/'.format(uid=uid, channel=channel) + filename
                 bucket.put_object(obj, voice_file)
             elif uid and classification == 0:
                 return response.json(178)
             else:
-                obj = 'voice_prompt/{uid}/{channel}/'.format(uid=uid, channel=channel) + filename
+                obj = 'voice_prompt/system/' + filename
                 bucket.put_object(obj, voice_file)
             VoicePromptModel.objects.create(**voice_prompt_dict)
             return response.json(0)