uploads

Log | Files | Refs

commit e095fb98f5b2389794d3487c5d91003f50d2455e
parent e493f601c897618cfeee899ed4f59e572de3baff
Author: Amit Dutta <mail@amit.is-a.dev>
Date:   Tue, 21 Jul 2026 08:31:03 +0530

Update index.py
Diffstat:
Mapi/index.py | 18------------------
1 file changed, 0 insertions(+), 18 deletions(-)

diff --git a/api/index.py b/api/index.py @@ -217,21 +217,3 @@ async def serve_expiring_file(item_id: str): pass # if metadata can't be checked, fail open rather than block a valid file return RedirectResponse(url=raw_url(item_id), status_code=302) - - -@app.get("/api/files") -async def list_files(): - api = get_api() - try: - entries = api.list_repo_files(repo_id=DATASET_REPO, repo_type="dataset", token=HF_TOKEN) - except Exception as e: - raise HTTPException(status_code=500, detail=str(e)) - - files = [] - for name in entries: - if name.endswith(".meta.json") or name == ".gitattributes": - continue - files.append({"item_id": name, "url": raw_url(name)}) - - files.sort(key=lambda x: x["item_id"], reverse=True) - return {"files": files}
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror