Skip to content

Commit af8f223

Browse files
authored
AIOHTTP Filename upload (#241)
* add the option to specify a filename on AIOHTTPTransport multipart upload
1 parent bd96caa commit af8f223

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ virtualenv gql-dev
3131
Activate the virtualenv and install dependencies by running:
3232

3333
```console
34-
python pip install -e.[dev]
34+
python -m pip install -e.[dev]
3535
```
3636

3737
If you are using Linux or MacOS, you can make use of Makefile command

gql/transport/aiohttp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ async def execute(
185185

186186
# Add the extracted files as remaining fields
187187
for k, v in file_streams.items():
188-
data.add_field(k, v, filename=k)
188+
data.add_field(k, v, filename=getattr(v, "name", k))
189189

190190
post_args: Dict[str, Any] = {"data": data}
191191

0 commit comments

Comments
 (0)