hazemhagrass / phonegap-base64

Plugin to get base64 encoding of any IMAGE, Base64 can be retrieved for any file for android, however for iOS images only supported
19 stars 42 forks source link

Is it convert autio or video to base64? #4

Closed ssharmass closed 7 years ago

ssharmass commented 9 years ago

Hi, I want to upload audio and video too so, I am getting issue of not converting in base64 ,please tell me regarding that.

Regards Shivam

roysG commented 9 years ago

yes, i also want to know that.

hazemhagrass commented 8 years ago

I'm afraid I'm not understanding you very well, can you post a sample snippet or something?

jmbello commented 8 years ago

Hi. What I think they are talking about is this: line 83 you have this imgStr = "data:image/*;charset=utf-8;base64," + imgStr;

I'm guessing this only works for image, when i convert some other formats (like audio or video, they use 3gp or mp3/mp4/wav) their mime type will be also data:image.

I have this issue in my project right now, i need to send files (image, audio and video) from my android app to a web server, so, in order to do this i use your plugin to get base64 string and this string convert to blob and finally send it. But when my server receive it cannot convert back to that proper format because of the "hardcoded" mime type.

hazemhagrass commented 7 years ago

Sorry for beign too late. Images only are supported