Added audio uploading support in posts. Needs improvements to detect its ID3 tags

This commit is contained in:
2018-12-20 17:29:23 -06:00
parent 93e6cd36a7
commit d71721ab87
3 changed files with 26 additions and 0 deletions

View File

@@ -49,3 +49,9 @@ class attachDialog(widgetUtils.BaseDialog):
result = dlg.GetValue()
dlg.Destroy()
return result
def get_audio(self):
openFileDialog = wx.FileDialog(self, _(u"Select the audio file to be uploaded"), "", "", _("Audio files (*.mp3)|*.mp3"), wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
if openFileDialog.ShowModal() == wx.ID_CANCEL:
return None
return openFileDialog.GetPath()