diff --git a/scratchattach/site/session.py b/scratchattach/site/session.py index 3769ce99..2903a69c 100644 --- a/scratchattach/site/session.py +++ b/scratchattach/site/session.py @@ -279,6 +279,7 @@ def upload_asset(self, asset_content, *, asset_id=None, file_ext=None): if isinstance(asset_content, str): file_ext = pathlib.Path(asset_content).suffix + file_ext = file_ext.replace(".", "") if asset_id is None: asset_id = hashlib.md5(data).hexdigest() @@ -286,6 +287,7 @@ def upload_asset(self, asset_content, *, asset_id=None, file_ext=None): requests.post( f"https://assets.scratch.mit.edu/{asset_id}.{file_ext}", headers=self._headers, + cookies = self._cookies, data=data, timeout=10, )