# fix: MissingContentLength in boto3 version 1.36.1
boto3 1.36.0 enabled checksum calculation and validation by default, which many S3-compatible providers (DigitalOcean Spaces, OCI, Linode, Contabo, iDrive, Hitachi) do not support yet, producing `MissingContentLength` on PutObject. Fix it by opting out of the new defaults. Either set the environment variables:
AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED
AWS_RESPONSE_CHECKSUM_VALIDATION=WHEN_REQUIRED
or pass a botocore Config:
from botocore.config import Config
config = Config(request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED')
s3 = boto3.resource('s3', config=config, endpoint_url='YOUR_ENDPOINT',
aws_access_key_id='YOUR_KEY', aws_secret_access_key [your value]
Use boto3 1.36.5 or newer, since an s3transfer bug that stopped these options applying to high-level S3 operations was fixed there. Downgrading to 1.35.99 also works but is the weaker option.
## Context from the issue
gh:boto/boto3#4398: Issue boto/boto3#4398 (closed, 22 comments): ### Describe the bug
---
### Description
I encountered an issue while using `boto3` version `1.36.1` in conjunction with `django-storages`. When attempting to upload files to AWS S3, I received the following error:
```
An error occurred (MissingContentLength) when calling the PutObject operation: Unknown
```
### Steps to Reproduce
1. Install `boto3` version `1.36.1` and `django-storages`.
2. Configure Django to use S3 for file storage.
3. Attempt to upload a file to S3.
### Environment
- `boto3` version: `1.36.1`
- `django-storages` version: django-storages==1.14.4
- Django version:...