api_ping. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.
()
| 13713 | cur = conn.cursor() |
| 13714 | cur.execute( |
| 13715 | "INSERT INTO dm_files(dm_id, filename, mime, stored_path, size, created_at) VALUES(?,?,?,?,?,?)", |
| 13716 | (dm_id, "gif.gif", "image/gif", "PENDING", 0, now_z()) |
| 13717 | ) |
| 13718 | fid = cur.lastrowid |
| 13719 | stored_path = os.path.join(DM_FILES_DIR, f"dm_file_{fid}.bin") |
| 13720 | conn.commit() |
| 13721 | conn.close() |
| 13722 | |
| 13723 | # Download with a cap to avoid abuse. |
| 13724 | max_bytes = CHAT_MAX_BYTES # 33 MB |
| 13725 | size = 0 |
| 13726 | mime = "image/gif" |
| 13727 | filename = "gif.gif" |
| 13728 | |
| 13729 | req = urllib.request.Request( |
nothing calls this directly
no test coverage detected