title: Upload a document in remote Filesystem and then persist document metadata in database in same transaction?
body: <p>We are developing a REST interface. The consumer will send a pdf file as base64 encoded string as a field in JSON post request. Other fields in the JSON contain metadata about the file. We are consuming another <strong>REST</strong> service to upload the document. Once the document is uploaded, the document reference returned from the service has to be stored in db along with other metadata. We wondering if there's a transnational way of doing so in one single request or do we have to expose 2 end points, one for the upload and the second to store data in db?</p>