A plugin that allows you to take pictures and upload the images from adminer. It was base on file-upload plugin.
Works with all fields ending with "_photo" or any other regex.
It depends on webcam.min.js. You can find here: https://github.com/jhuckaby/webcamjs
Your site must be httpS to get this plugin working.
Create an index.php
with the following content:
<?php
function adminer_object() {
include_once "./plugins/plugin.php"; // required to run any plugin
foreach (glob("./plugins/*.php") as $filename) { include_once $filename; } // autoloader
$plugins = array(
// specify plugins here.
new AdminerCameraUpload()
);
return new AdminerPlugin($plugins);
}
include "./your-compiled-or-downloaded-adminer.php";
A typical deploy looks like this:
π webserver_root
βββ π adminer
β βββ π adminer.css
β βββ π index.php
β βββ π your-compiled-or-downloaded-adminer.php
β βββ π plugins
β βββ π plugin.php
β βββ π camera-upload.php # plugin goes here
β βββ π static
β βββ π webcam.min.js
βββ π photos # uploaded photos path (customizable)
β βββ π db
β βββ π table
β βββ π field
β βββ π field_241208_201430.jpg
β βββ π field_241208_201535.jpg
β βββ π field_241208_201621.jpg
β βββ π ...
Example of a table for testing purposes:
CREATE TABLE test (
id int NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
my_photo varchar(255),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8