Skip to content

Instantly share code, notes, and snippets.

@Mause
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mause/9688766 to your computer and use it in GitHub Desktop.
Save Mause/9688766 to your computer and use it in GitHub Desktop.
files = {
'unique_filename': 'file_data',
'unique_filename': ('filename', 'file_data'),
'unique_filename': ('filename', 'file_data', 'custom file content type'),
'unique_filename': (
'filename',
'file_data',
'custom file content type',
<custom headers in tuple or dict>
)
}
...
requests.post(<url>, files=files)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment