summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 3375da7cf..6a1f7c820 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -754,7 +754,7 @@ module.exports.getProfiles = function(success, error) {
};
module.exports.uploadFile = function(formData, success, error) {
- $.ajax({
+ var request = $.ajax({
url: "/api/v1/files/upload",
type: 'POST',
data: formData,
@@ -763,12 +763,16 @@ module.exports.uploadFile = function(formData, success, error) {
processData: false,
success: success,
error: function(xhr, status, err) {
- e = handleError("uploadFile", xhr, status, err);
- error(e);
+ if (err !== 'abort') {
+ e = handleError("uploadFile", xhr, status, err);
+ error(e);
+ }
}
});
module.exports.track('api', 'api_files_upload');
+
+ return request;
};
module.exports.getPublicLink = function(data, success, error) {