Jelajahi Sumber

添加设备音频优化

linhaohong 5 bulan lalu
induk
melakukan
6cde0ef77c
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  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)