ios - How to determine what's the file type -
i use asihttprequest download file. url http://www.aaa.bbb.com:8000/showuploaddocument.aspx?docid=45. not able determine file type through url. how can determine file type of downloaded file?
you can query content-type header returned server:
nsstring *contenttype = [[request responseheaders] objectforkey:@"content-type"]; this string image/jpeg, text/plain, etc.
Comments
Post a Comment