javascript - Upload a base64 encoded image using FormData? -
i have jpeg base64 encoded string.
var image = "/9j/4aaqskzjrgabaqeas..."
i upload jpeg server using formdata.
var info = new formdata();
what proper way append image data?
your image info nil more string, append formdata object this:
data.append("image_data", image);
then on server side can store straight in database or convert image , store on file system. might find this post helpful.
javascript form-data
No comments:
Post a Comment