문제

I got an issue with transferring MP3 format or wav format from local to FTP. The music got distorted or even blank sounds.

I used session.storbinary('STOR '+ fileName, fileOpen) which causes the sound distortion. Is there any other way to transfer the files over? Or I have to do it manually?

I'm using python with ftplib.

도움이 되었습니까?

해결책

Make sure to open your local files like this:

f = open('something.mp3', 'rb')

Using open('asd.mp3') will treat the file as text and result in corruption. Now, I can't be sure this is the problem, but without more context this is my closest bet.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top