]> jfr.im git - uguu.git/blame - api.php
Update api.php
[uguu.git] / api.php
CommitLineData
78b2d83e
GJ
1<?php
2if(isset($_GET['d'])) {
3 include_once('core.php');
4 switch ($_GET['d']) {
5
6 case 'upload':
f6de5bc0
GJ
7 $name = $_FILES['file']['name'];
8 if(!empty($_POST['name'])){
9 $name = $_POST['name'];
10 }
11 save_file($_FILES['file']['tmp_name'], $name);
12 break;
13
14 case 'upload-sharex':
78b2d83e 15
f6de5bc0 16 break;
78b2d83e
GJ
17
18 case 'extend-time':
19 break;
20 default:
21 exit('Please provide a valid argument. Example: curl -i -F name=test.jpg -F file=@localfile.jpg http://uguu.se/api.php?d=upload');
22 break;
23 }
24}else{
25 exit('Please provide a valid argument. Example: curl -i -F name=test.jpg -F file=@localfile.jpg http://uguu.se/api.php?d=upload');
26}