box / box-salesforce-sdk

This is the Salesforce SDK for integrating with the Box Platform.
https://developer.box.com/guides/tooling/sdks/salesforce/
Apache License 2.0
58 stars 51 forks source link

Add support for body parameters when uploading new file version #39

Open Feldhacker opened 6 years ago

Feldhacker commented 6 years ago

Currently, the SDK only supports building a multipart/form-data body using the file content only. However, the Upload File Version operation supports additional body parameters for specifying a new 'name' as well as the 'content_modified_at' attribute. (https://developer.box.com/reference#upload-a-new-version-of-a-file)

(The "BoxBase64" class itself seems to be non-standard (looks like it's blending in some "quoted-printable" encoding?, etc.), and we've been unsuccessful at trying to modify this class to support the additional body parameters...)

The workaround is to upload the new file version then rename the file in a separate request.