linhaohong 5 сар өмнө
parent
commit
6cde0ef77c

+ 2 - 2
AdminController/DeviceManagementController.py

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