summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-06-02 02:00:25 +0400
committerilotterytea <iltsu@alright.party>2025-06-02 02:00:25 +0400
commit487b0592e3a10688f4d54e0feeef4f8ffb689bbe (patch)
tree4aa742ab42114bc355fb7ed3903cd7fa3c6a573a
parent2f2b152860de21c12adebafc25a3b5d75cdf3853 (diff)
feat: download url
-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 {