summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/upload.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/static/upload.php b/static/upload.php
index da5e311..e2a3016 100644
--- a/static/upload.php
+++ b/static/upload.php
@@ -56,7 +56,12 @@ function upload_file ($file) {
// the previous data.
if ($result['hash'] === $file->get_sha1()) {
unlink($file->tempfile);
- return $result;
+ return array(
+ 'hash' => $result['hash'],
+ 'name' => $file->name,
+ 'url' => $result['filename'],
+ 'size' => $result['size']
+ );
} else {
// Generate a name for the file
$newname = generate_name($file);