fix appKey's format checking; add media file downloading