I am sorry, be we cannot access files in frontend functions like that.
To get base64, you would need a piece of software that both has access to the original file and can generate the base64 version - and both would need to work in the browser (if in context of a frontend function). There are approaches for this, but nothing we can offer with our current tech stack.