Added functionality for html when its file upload in addition to the direct link function