## s3.upload_object()


Upload bytes or a local file to an object store and confirm it arrived.


Usage

``` python
s3.upload_object(
    src,
    dst,
)
```


Every object freezebase writes to a store goes through here rather than through GDAL's `/vsis3/`: GDAL does not sign the `Content-Type` header it sends, which a gateway may reject, and it reports a failed upload as a warning rather than an error. s3fs signs every header and raises on a refused request, and the stored size is read back so an upload that was accepted but not kept fails too.


## Parameters


`src: bytes or Path`  
Content, or a local file to upload.

`dst: str, Path, or UPath`  
Destination object. On S3 its content type comes from [content_type_for()](s3.content_type_for.md#freezebase.s3.content_type_for).


## Raises


`ValueError`  
If `dst` is on the local filesystem.

`OSError`  
If the store refuses the upload, naming the store's error, or if the stored object does not have the size that was uploaded. A refusal keeps the subclass s3fs raised, e.g. `PermissionError` for `AccessDenied`.
