Base64-encoding a Videofile in js
问题 So i've got a video file and the path to it (e.g. /outerfolder/innerfolder/video.mp4 ). I now want to encode this video with Base64 in JS so that I am able to store it in a database. If you could help me with the encoding of the video file, I would be very thankful. Thanks in advance. 回答1: You could encode the file with the following function to convert your file to an ArrayBuffer: [update] //<input type=file id="encondeMP4"> var encodeMP4 = document.getElementById('encondeMP4'); You now add