Skip to content

Commit

Permalink
adding data and files.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdev2 committed Oct 15, 2020
1 parent 1f1d50d commit 490a5f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion floor_flasher/flashfloor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ async def fetch(url, session):
return (response_status,response_text)

async def post_firmware(url, session, firmwarepath):
async with session.post(url, data={'file': open(firmwarepath, 'rb')}) as response:
payload = {'device': 0}
async with session.post(url, data=payload, files={'file': open(firmwarepath, 'rb')}) as response:
response_text = await response.text()
response_status = response.status
return (response_status,response_text)
Expand Down

0 comments on commit 490a5f0

Please sign in to comment.