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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -