Reads the content of a file based on its source type. If the file source is a local path, the file content is read and returned as a string. If the file source is a URL, an error is thrown.
Converts the file content to a Base64 encoded string. This method supports encoding for files with a local path source. For URL sources, an exception is thrown since encoding is not supported directly.