Fix issue could not get content length and content type of file