aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/ducks
diff options
context:
space:
mode:
authorClemens <cle1000.cb@gmail.com>2016-07-13 20:18:04 +0200
committerClemens <cle1000.cb@gmail.com>2016-07-13 20:18:04 +0200
commit121079934e705ae91a983c0ea5858b5483941d7f (patch)
tree8a7b843245913d7bb82e0ba749640ae57760a167 /web/src/js/ducks
parentf84098554a3d50ec02255603bb0a145b3aa0c6b2 (diff)
downloadmitmproxy-121079934e705ae91a983c0ea5858b5483941d7f.tar.gz
mitmproxy-121079934e705ae91a983c0ea5858b5483941d7f.tar.bz2
mitmproxy-121079934e705ae91a983c0ea5858b5483941d7f.zip
make file out ouf string to combine flow content updates via editor and fileupload
Diffstat (limited to 'web/src/js/ducks')
-rw-r--r--web/src/js/ducks/flows.js2
1 files changed, 2 insertions, 0 deletions
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 }