]> git.ipfire.org Git - pbs.git/commitdiff
uploads: Return the received filename in the API response
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jan 2025 17:13:27 +0000 (17:13 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jan 2025 17:13:27 +0000 (17:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/uploads.py

index 1458c2cefa8741872ba1211ef301ec6e79544f39..91c31ee4ebe50db9d1181826e37fea28de15221a 100644 (file)
@@ -104,6 +104,9 @@ class APIv1IndexHandler(base.APIMixin, base.BaseHandler):
                        "id"         : "%s" % upload.uuid,
                        "expires_at" : upload.expires_at.isoformat(),
 
+                       # Filename
+                       "filename"   : upload.filename,
+
                        # The URL the client should send the payload to
                        "url"        : self.backend.url_to("/api/v1/uploads/%s" % upload.uuid),
                })