1
0
mirror of https://github.com/nokonoko/Uguu.git synced 2024-01-06 13:35:15 +00:00
uguu/api.php

27 lines
653 B
PHP
Raw Normal View History

2015-02-04 19:21:50 +00:00
<?php
if(isset($_GET['d'])) {
include_once('core.php');
switch ($_GET['d']) {
case 'upload':
2015-02-07 18:19:38 +00:00
$name = $_FILES['file']['name'];
if(!empty($_POST['name'])){
$name = $_POST['name'];
}
save_file($_FILES['file']['tmp_name'], $name);
break;
case 'upload-sharex':
2015-02-04 19:21:50 +00:00
2015-02-07 18:19:38 +00:00
break;
2015-02-04 19:21:50 +00:00
case 'extend-time':
break;
default:
exit('Please provide a valid argument. Example: curl -i -F name=test.jpg -F file=@localfile.jpg http://uguu.se/api.php?d=upload');
break;
}
}else{
exit('Please provide a valid argument. Example: curl -i -F name=test.jpg -F file=@localfile.jpg http://uguu.se/api.php?d=upload');
}