ibm mobilefirst - how to upload the image in worklight -
how can upload image sql database?
current mysql query:
create table upload ( id int not null auto_increment, name varchar(30) not null, type varchar(30) not null, size int not null, content mediumblob not null, primary key(id) );
html file
<form method="post" enctype="multipart/form-data"> <input type="hidden" name="max_file_size" value="2000000"> <input type="file" id="userfile" name="userfiles"> <br> <input type="submit" id="upload" value="uploadimage "name="uploads"onclick="upload()"> </form>
i don't know sql query, doesn't tell much.
what need base64 encode image , save string database.
when want pull image , display it, need decode string image.
Comments
Post a Comment