mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-04-26 23:30:10 +00:00
Fix errors in js_upload addon
This commit is contained in:
parent
1860e732ae
commit
81f232d57e
3 changed files with 16 additions and 16 deletions
|
@ -2,11 +2,11 @@
|
|||
|
||||
sleep(4);
|
||||
|
||||
$fileName;
|
||||
$fileName = '';
|
||||
|
||||
if (isset($_GET['qqfile'])){
|
||||
$fileName = $_GET['qqfile'];
|
||||
|
||||
|
||||
// xhr request
|
||||
$headers = apache_request_headers();
|
||||
if ((int)$headers['Content-Length'] == 0){
|
||||
|
@ -14,7 +14,7 @@ if (isset($_GET['qqfile'])){
|
|||
}
|
||||
} elseif (isset($_FILES['qqfile'])){
|
||||
$fileName = basename($_FILES['qqfile']['name']);
|
||||
|
||||
|
||||
// form request
|
||||
if ($_FILES['qqfile']['size'] == 0){
|
||||
die ('{error: "file size is zero"}');
|
||||
|
@ -25,7 +25,7 @@ if (isset($_GET['qqfile'])){
|
|||
|
||||
if (count($_GET)){
|
||||
$_GET['success'] = true;
|
||||
echo json_encode(array_merge($_GET));
|
||||
echo json_encode(array_merge($_GET));
|
||||
} else {
|
||||
die ('{error: "query params not passed"}');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue