Skip to content

Instantly share code, notes, and snippets.

@pointofpresence
Last active March 31, 2024 11:41
Show Gist options
  • Save pointofpresence/8033a6019d5bc5a5425db96ce1559f86 to your computer and use it in GitHub Desktop.
Save pointofpresence/8033a6019d5bc5a5425db96ce1559f86 to your computer and use it in GitHub Desktop.
Загрузка файла на сервер методом POST и передача дополнительных полей
files = {'upload_file': open('file.txt','rb')}
values = {'DB': 'photcat', 'OUT': 'csv', 'SHORT': 'short'}
r = requests.post(url, files=files, data=values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment