Skip to content

Commit

Permalink
feat(forms): Allow flexible output format by removing extension from fp
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Jun 26, 2024
1 parent 0838ffc commit f65ff42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctor/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AudioForm(BaseAudioFile):
audio_data = forms.JSONField(label="audio-data", required=False)

def clean(self):
self.cleaned_data["fp"] = f"/tmp/audio_{uuid.uuid4().hex}.mp3"
self.cleaned_data["fp"] = f"/tmp/audio_{uuid.uuid4().hex}"
if self.cleaned_data.get("file", None):
filename = self.cleaned_data["file"].name
self.cleaned_data["extension"] = filename.split(".")[-1]
Expand Down

0 comments on commit f65ff42

Please sign in to comment.