Skip to content

Commit

Permalink
Add support for file types to setDocument().
Browse files Browse the repository at this point in the history
This is to implement access to all parameters of the document endpoint:

  https://github.com/jenstroeger/Bookalope/blob/master/API.md#post-bookflows-files-document
  • Loading branch information
jenstroeger committed Apr 18, 2019
1 parent a29659e commit 8f5f454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/Bookalope/js/uses/BookalopeClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ Bookflow.prototype.getDocument = function() {
* @returns {Promise}
*/

Bookflow.prototype.setDocument = function(filename, file) {
Bookflow.prototype.setDocument = function(filename, file, filetype="doc") {
var bookflow = this;
var bookalope = bookflow._bookalope;

Expand All @@ -1077,7 +1077,7 @@ Bookflow.prototype.setDocument = function(filename, file) {
var url = bookflow.url + "/files/document";
var params = {
filename: filename,
filetype: "doc",
filetype: filetype,
file: btoa(file)
};
bookalope.httpPOST(url, params)
Expand Down

0 comments on commit 8f5f454

Please sign in to comment.