|
@@ -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)
|