diff --git a/src/request.ts b/src/request.ts index d41b38ea..864913b0 100644 --- a/src/request.ts +++ b/src/request.ts @@ -65,6 +65,10 @@ export default function upload(option: UploadRequestOption) { xhr.onerror = function error(e) { option.onError(e); }; + + xhr.ontimeout = function timeout(e) { + option.onError(e); + }; xhr.onload = function onload() { // allow success when 2xx status