Added a check for file upload in dataURItoBlob