Commit 46a642ae authored by Aurel's avatar Aurel

it is not asynchronous here

parent edf96f66
...@@ -74,10 +74,8 @@ ...@@ -74,10 +74,8 @@
if (param.data instanceof FormData) { if (param.data instanceof FormData) {
xhr.setRequestHeader("Content-Type", xhr.setRequestHeader("Content-Type",
"multipart\/form-data; boundary=" + param.data.getBoundary()); "multipart\/form-data; boundary=" + param.data.getBoundary());
param.data.pipe(buffer, {end: false}); param.data.pipe(buffer);
param.data.on("end", function () {
xhr.send(buffer.getContents()); xhr.send(buffer.getContents());
});
} else { } else {
xhr.send(param.data); xhr.send(param.data);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment