Skip to content
Advertisement

whats is the best/fastest way to upload images from android to mysql?

whats is the best/fastest way to upload images from android to mysql?

the problem that im having that uploading images encoded in base46 that it takes almost 10sec and after 3 or 4 uploads using bitmap the app crashes sometimes because bitmap other because of the encoded images on old android phone.. right now im using ION but i guess ion isnt the best right now as 10sec i find it alot and on more question should i send them as List, JSON array, JSON array then JSON object or params ?

bitmap Error which is only happen after 3 or 4 successful uploads

JavaScript

image selection

JavaScript

encode images

JavaScript

php

JavaScript

Advertisement

Answer

Edit: reread your code, you are compressing to a PNG. So it just leaves one issue

Don’t use base64. It’s binary data, send it as binary data. Sending it as Base64 will always increase it to 2-3x the size. Base64 should only be used where you absolutely have to, its a hack to send binary data over text only channels like URLs.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement