In this example a Neste exemplo será desenvolvido um formulário do tipo “Single Record” will be developed with the “multiple images upload” resource.
Creating a form with multiple images upload.
Note:To use the Multiple Images resource we need a database table that can receive the uploaded files. As in the SQL example below:
CREATE TABLE `files_table` ( `fileid` int(11) NOT NULL, `userid` int(11) DEFAULT NULL, `binaryvalue` longblob, `filename` varchar(100) DEFAULT NULL, `filetype` varchar(10) DEFAULT NULL, PRIMARY KEY (`fileid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Note:If you have any doubt of how to create a Form, access here: Creating a new Form
1. Create a new “Single Record” Form using the employees table.
2. In the app menu, go to Fields and create a new “Image (Database)”.
3. Access the new field settings in the “Multi-upload” section, and change the settings as in the image below:
4. Click on “Run Application” in the toolbar to generate and execute your app.
5. Now your application is ready to use the multiupload component, you just need to drag and drop your image to the area or use the button Add files and click in the button Start upload.