Skip to content

Commit

Permalink
We have to use application/x-www-form-urlencoded instead of multipart…
Browse files Browse the repository at this point in the history
…/form for SlimerJS to be able to get the post body; otherwise the file upload data is prematurely truncated in the request info.
  • Loading branch information
tung-jin-chew-hp committed Mar 3, 2017
1 parent 1f5cc8c commit fdf808d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ define([
var children = _.compact(arguments);

// Since it's an async action, we have to keep it as target: _self to avoid the popup blocker.
var $form = $('<form class="hide" enctype="multipart/form-data" method="post" action="api/bi/export/ppt/report"><input name="multipage"><textarea name="data"></textarea><input type="submit"></form>');
var $form = $('<form class="hide" enctype="application/x-www-form-urlencoded" method="post" action="api/bi/export/ppt/report"><input name="multipage"><textarea name="data"></textarea><input type="submit"></form>');

$form[0].data.value = JSON.stringify({
children: children
Expand Down

0 comments on commit fdf808d

Please sign in to comment.