From 121079934e705ae91a983c0ea5858b5483941d7f Mon Sep 17 00:00:00 2001 From: Clemens Date: Wed, 13 Jul 2016 20:18:04 +0200 Subject: make file out ouf string to combine flow content updates via editor and fileupload --- web/src/js/ducks/flows.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web/src/js') diff --git a/web/src/js/ducks/flows.js b/web/src/js/ducks/flows.js index 36274f39..8815db25 100644 --- a/web/src/js/ducks/flows.js +++ b/web/src/js/ducks/flows.js @@ -119,6 +119,8 @@ export function update(flow, data) { export function update_content(flow, file) { const body = new FormData() + if (typeof file !== File) + file = new Blob([file], {type: 'plain/text'}) body.append('file', file) fetchApi(`/flows/${flow.id}/response/content`, {method: 'post', body} ) return { type: REQUEST_ACTION } -- cgit v1.2.3