Update app.py
Browse files20 unmodified lines212223242526272829303132333420 unmodified linessave_path = os.path.join(save_dir, filename)print(f"[DEBUG] Try download: url={url} save_path={save_path}")try:resp = requests.get(url, timeout=30)print(f"[DEBUG] HTTP {resp.status_code} for {url}")resp.raise_for_status()if resp.headers.get('content-type', '').startswith('text/html'):print(f"Warning: Received HTML response, file might not exist: {filename}")return Nonewith open(save_path, "wb") as f:f.write(resp.content)print(f"Downloaded attachment for task {task_id} -> {save_path}")return save_path20 unmodified lines21222324252627282930313233343520 unmodified linessave_path = os.path.join(save_dir, filename)print(f"[DEBUG] Try download: url={url} save_path={save_path}")try:resp = requests.get(url, timeout=30)print(f"[DEBUG] HTTP {resp.status_code} for {url}")resp.raise_for_status()if resp.headers.get('content-type', '').startswith('text/html'):print(f"Warning: Received HTML response, file might not exist: {filename}")return Nonewith open(save_path, "wb") as f:f.write(resp.content)print(f"Downloaded attachment for task {task_id} -> {save_path}")return save_path
app.py+5-4