Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type='file' onchange='openFile(event)' id="EdituserProfileImage">
- var fileName;
- var filetype;
- var filesize;
- var VoiceBase64;
- var openFile = function (event) {
- var input = event.target;
- fileName = input.files[0].name;
- filetype = input.files[0].type;
- filesize = input.files[0].size;
- console.log(input);
- console.log(fileName);
- var reader = new FileReader();
- reader.onload = function (evt) {
- var voiceInBinay = evt.target.result;
- VoiceBase64 = btoa(voiceInBinay);
- contvertBase64toBinaray(VoiceBase64);
- };
- reader.readAsBinaryString(input.files[0]);
- };
- function contvertBase64toBinaray(VoiceBase64) {
- var audiofile = atob(VoiceBase64)
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement