Transform file from local or network to base64 string data