This commit is contained in:
Viggo
2017-12-20 13:23:22 +08:00
parent c463423d63
commit 2ddd48d844
1196 changed files with 227177 additions and 0 deletions

25
data/upload-file.php Executable file
View File

@@ -0,0 +1,25 @@
<?php
header('Content-Type: application/json');
#$errors = mt_rand(0,100)%2==0; // Random response (Demo Purpose)
$errors = false;
$resp = array(
);
# Normal Response Code
if(function_exists('http_response_code'))
http_response_code(200);
# On Error
if($errors)
{
if(function_exists('http_response_code'))
http_response_code(400);
$resp['error'] = "Couldn't upload file, reason: ~";
}
echo json_encode($resp);