fix: ensure temp file check handles non-dictionary items

This commit is contained in:
KarrixLee
2025-04-25 13:29:34 +08:00
parent 77eb9f9805
commit 5d85bfd38f
+2 -2
View File
@@ -1949,7 +1949,7 @@ async def handle_upload(
for item in items:
# Skipping temp files
if item.get("type") == "temp":
if isinstance(item, dict) and item.get("type") == "temp":
continue
file_type = item.get(content_type_key, default_content_type)
@@ -2019,7 +2019,7 @@ async def upload_in_background(
}
# Skip temp files
if item.get("type") == "temp":
if isinstance(item, dict) and item.get("type") == "temp":
continue
# Add to the upload queue instead of uploading immediately