]> git.ipfire.org Git - pbs.git/commitdiff
uploads: Send an URL to the client where to send the payload
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jan 2025 10:39:39 +0000 (10:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jan 2025 10:39:39 +0000 (10:39 +0000)
Hopefully this will give us some more flexibility in the future.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/uploads.py

index 122d03e59f47ce5573c7086e80f294b2f946748e..9190b35c24a9e2273887613e9be320e41d57c76d 100644 (file)
@@ -103,6 +103,9 @@ class APIv1IndexHandler(base.APIMixin, base.BaseHandler):
                self.finish({
                        "id"         : "%s" % upload.uuid,
                        "expires_at" : upload.expires_at.isoformat(),
+
+                       # The URL the client should send the payload to
+                       "url"        : self.backend.url_to("/api/v1/uploads/%s" % upload.uuid),
                })