Spaces:
Sleeping
Sleeping
Placebo Deploy commited on
Commit ·
28fe65d
1
Parent(s): 000a857
Fix Windows path handling in zip extraction
Browse files168 unmodified lines169170171172173174175168 unmodified linescontent = zf.read(path)except KeyError:# Fallback: search for the filename anywhere in the zip if exact path failsfilename = path.split('/')[-1]matches = [name for name in zf.namelist() if name.endswith(filename)]if not matches:return Response(status_code=404, content="Image not found in zip archive.")168 unmodified lines169170171172173174175168 unmodified linescontent = zf.read(path)except KeyError:# Fallback: search for the filename anywhere in the zip if exact path failsfilename = path.replace('\\', '/').split('/')[-1]matches = [name for name in zf.namelist() if name.endswith(filename)]if not matches:return Response(status_code=404, content="Image not found in zip archive.")
src/app.py+1-1