File could be from http or local file URL.