Seems you are using content multipart encoding. That's not applicable to Dropbox API. Raw file content have to be used! Header lines have to be set in the main HTTP header block (other header types are not acceptable in this API - that's why they go in file content).
Well, we know it can be hard to keep up good habits, so we made a new working from home cheat sheet, with some good habits, some things to avoid and some tips for making your day a little easier. Check it out here.
Work Smarter with Dropbox
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.