Search code examples
iphoneobjective-ciosm4a

.m4a file is not playing while uploading to server


In my app i am uploading .m4a music file from iphone library (storing in core data) which is downloaded from itunes, problem is the uploaded file is not playing (even in browser), some times the uploaded file is of 4MB size, in server it is showing 20KB. If i upload a .mp3 file it is perfectly uploading and perfectly playing. please help me.My code follows like this.

[request addData:[managedobject valueForKey:@"songData"] withFileName:[managedobject valueForKey:@"song_name"] andContentType:nil forKey:@"file"];


[request setPostValue:[managedobject valueForKey:@"song_extension"] forKey:@"extension"];

Solution

  • Try manually uploading the file to your server to verify that it will play at all... because of Apples Fairplay (http://en.wikipedia.org/wiki/FairPlay) DRM, I have had trouble playing songs bought off the store as well. However, if this is not the case, then recheck your upload code because something is wrong.