lstrip the "/"

Co-authored-by: Masen Furer <m_github@0x26.net>
This commit is contained in:
Khaleel Al-Adhami 2025-02-13 12:48:02 -08:00 committed by GitHub
parent acd4528a2b
commit 8144378c22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1610,7 +1610,7 @@ def upload(app: App):
file_copies.append(
UploadFile(
file=content_copy,
path=Path(file.filename) if file.filename else None,
path=Path(file.filename.lstrip("/")) if file.filename else None,
_deprecated_filename=file.filename,
size=file.size,
headers=file.headers,