Closed mao-dongyang closed 5 months ago
The fix is to replace file_ext = media_name.split('.')[1] with file_ext = media_name.split('.')[-1]. This modification ensures the correct extraction of the file extension, enhancing the code's robustness.
file_ext = media_name.split('.')[1]
file_ext = media_name.split('.')[-1]
The fix is to replace
file_ext = media_name.split('.')[1]
withfile_ext = media_name.split('.')[-1]
. This modification ensures the correct extraction of the file extension, enhancing the code's robustness.