Is the following a correct example of the form POST data in a file upload in the box api 2.0? The documentation says that the 'filename' form field is a string but when sending the post data in, say, python, you need to actually send the file contents in the post. So, is the content-disposition: form-data line below the correct way to name the 'filename' field and include the file contents?
Content-type: multipart/form-data, boundary=AaB03x
Content-length: 142
Authorization: BoxAuth api_key=MY_API_KEY&auth_token=MY_AUTH_TOKEN
--AaB03x
content-disposition: form-data; name="filename"; filename="test.txt"
Content-type: text/plain
testing box api 2.0
--AaB03x--
This is working code.
Yes, that is the correct way to do it.
You mention Python, although you don't mention as being a requirement. If you can use Ruby (another scripting language) you have a very nice lib to deal with Box API at the 2.0 version.
The lib is named ruby-box and in the readme you can find how to use it.