Fix optional file fields with RB.BaseResource.
Review Request #4259 — Created June 25, 2013 and submitted — Latest diff uploaded
Fix optional file fields with RB.BaseResource. In change 624e56e I gave BaseResource the ability to upload multiple files as part of an API request. This worked, but wasn't able to cope with file fields that are optional. In the case where one or more of the fields pointed to by payloadFileKeys was undefined, it would raise a TypeError.
Used this in conjunction with my pre-commit WIP, which can sometimes upload only one file to a resource that takes two.