summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/upload.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/upload.php b/public/upload.php
index 3b7f58a..96d1f4b 100644
--- a/public/upload.php
+++ b/public/upload.php
@@ -158,6 +158,10 @@ try {
throw new RuntimeException("Failed to create a thumbnail (Error code {$thumbnail_error})");
}
+ $file_data['urls'] = [
+ 'download_url' => INSTANCE_URL . "/{$file_data['id']}.{$file_data['extension']}"
+ ];
+
if ($_SERVER['HTTP_ACCEPT'] == 'application/json') {
json_response($file_data, null, 201);
} else {