We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dce68f commit 5d55b4fCopy full SHA for 5d55b4f
mystbin/backend/routers/pastes.py
@@ -62,6 +62,7 @@
62
__config = json.load(__f)
63
64
del __p, __f # micro-opt, don't keep unneeded variables in-ram
65
+HAS_BUNNYCDN = bool(__config["bunnycdn"]["token"])
66
67
68
def generate_paste_id(n: int = 3):
@@ -224,7 +225,7 @@ async def post_rich_paste(
224
225
226
paste_id = generate_paste_id()
227
- if images:
228
+ if images and HAS_BUNNYCDN:
229
async def _partial(target, spool: UploadFile):
230
data = await spool.read()
231
await request.app.state.client.put(target, data=data, headers=headers) # TODO figure out how to pass spooled object instead of load into memory
0 commit comments