You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
478 B
16 lines
478 B
|
15 years ago
|
<?php
|
||
|
|
/* For licensing terms, see /license.txt */
|
||
|
|
/**
|
||
|
|
* Responses to AJAX calls for the document upload
|
||
|
|
*/
|
||
|
|
require_once '../global.inc.php';
|
||
|
|
if (api_is_anonymous()){
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
if(!empty($_FILES)) {
|
||
|
|
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
|
||
|
|
DocumentManager::upload_document($_FILES, $_POST['curdirpath'], '', '', 0);
|
||
|
|
$file = $_FILES['file'];
|
||
|
|
echo '{"name":"'.$file['name'].'","type":"'.$file['type'].'","size":"'.$file['size'].'"}';
|
||
|
|
}
|
||
|
|
exit;
|