Commit 1928fe36 authored by Aaron Hill's avatar Aaron Hill
Browse files

Added optional parameter form_field to _pack_image

parent d50ce7d7
......@@ -690,7 +690,7 @@ class API(object):
""" Internal use only """
def _pack_image(filename, max_size):
def _pack_image(filename, max_size, form_field="image"):
"""Pack image from file into multipart-formdata post body"""
# image must be less than 700kb in size
......@@ -712,7 +712,7 @@ class API(object):
body = []
body.append('--' + BOUNDARY)
body.append('Content-Disposition: form-data; name="image"; filename="%s"' % filename)
body.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (form_field, filename))
body.append('Content-Type: %s' % file_type)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment