# django.core.exceptions.ValidationError: ['The submitted file is empty.']

- **ID:** `python/django-form-invalid-upload`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

FileField receives an empty file, often due to missing enctype in form or invalid file input.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Ensure form has enctype="multipart/form-data" in template.
   ```
2. **** (90% success)
   ```
   In view, check if 'file' in request.FILES and file.size > 0.
   ```

## Dead Ends

- **** — Loses functionality; users cannot upload files. (80% fail)
- **** — May return None or empty, still fails validation. (90% fail)
