fileToBase64

Given an Uri that should be a file, it is converted to a Base64 string or null on error. Note: this doesn't require permission android.permission.READ_EXTERNAL_STORAGE because the Uri has the format of content:// which came from the SAF, Storage Access Framework, contrary to getting the file through file:// protocol.