3 * Drag and Drop file uploader.
5 * Copyright (C) 2017 Sherwin Gaddis <sherwingaddis@gmail.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>.
19 * @author Sherwin Gaddis <sherwingaddis@gmail.com>
20 * @link http://www.open-emr.org
23 $patient_id = filter_input(INPUT_GET
, 'patient_id');
24 $category_id = filter_input(INPUT_GET
, 'parent_id');
30 require_once(dirname(__FILE__
) . "/../../interface/globals.php");
31 require_once(dirname(__FILE__
) . "/../documents.php");
33 if (!empty($_FILES)) {
34 $name = $_FILES['file']['name'];
35 $type = $_FILES['file']['type'];
36 $tmp_name = $_FILES['file']['tmp_name'];
37 $size = $_FILES['file']['size'];
38 $owner = $GLOBALS['userauthorized'];
40 addNewDocument($name, $type, $tmp_name, $error, $size, $owner, $patient_id, $category_id);