Closed mdt82 closed 7 years ago
If console.log(XMLHttpRequest.DONE);
not print '4', #312 is same situation.
@dennis82m are you sure that server return 200 and JSON body, because I am getting the done
event normally. Also, please check demo.
kind of weird ... forked your demo and changed the settings to my server ... has nothing to do with the server though cause it works. I copied the component and template code 1:1 to my app .. everything works but the 'done' thing... ?!
then the only option is that server doesn't return response.
server does respond tested again with postman returns status 200 and json object
if you can share me the part of server code I can check on it.
so I checked #312 ... console.log("test", XMLHttpRequest.DONE);
results in
using Safari 10.1.2
I am really not sure what code you pasted here. Does it work in Chrome though?
this is just the console.log of XMLHttpRequest.DONE
does not work in chrome as well ... XMLHttpRequest.DONE holds a function there as well
changing XMLHttpRequest.DONE into this has no effect .. don't what to do next
share me the server side code or I cannot help you.
can't be a problem with the server because testing with postman works as you can see here
and using this code in your demo works as well fine
ngx-uploader is using application/json
not x-www-form-urlencoded
. thats the issue.
but the server is getting the file and putting it in the upload directory, ... everything works ... but the 'done' status?! and using YOUR demo results in everything to be fine ... I simply do not get the 'done' thing in my own app
I don't know honestly. Nobody till now had this issue and I am also using this module to upload files and always get the done status. since you cannot share the server side code I cannot help you, sorry.
I am getting the same issue. It's not returning the done status.
@xyrintech Find your external library which overwrite XMLHttpRequest variable. In my case, i found some library which overwrite XMLHttpRequest as function. After i removed the library (maybe it was chart library), this issue solved.
{ "name": "apex", "version": "2.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@agm/core": "^1.0.0-beta.1", "@angular/animations": "^5.1.2", "@angular/common": "^5.1.2", "@angular/compiler": "^5.1.2", "@angular/core": "^5.1.2", "@angular/forms": "^5.1.2", "@angular/http": "^5.1.2", "@angular/platform-browser": "^5.1.2", "@angular/platform-browser-dynamic": "^5.1.2", "@angular/platform-server": "^5.1.2", "@angular/router": "^5.1.2", "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5", "@ngx-translate/core": "^9.0.2", "@ngx-translate/http-loader": "^2.0.1", "@swimlane/ngx-charts": "^7.0.1", "@swimlane/ngx-datatable": "^11.1.7", "@types/chartist": "^0.9.36", "@types/d3-shape": "^1.2.1", "@types/jquery": "^3.2.17", "angular-calendar": "^0.22.3", "bootstrap": "4.0.0-beta", "bourbon": "^4.3.4", "chartist": "^0.11.0", "classlist.js": "^1.1.20150312", "core-js": "^2.5.3", "d3": "^4.11.0", "datatables.net": "^1.10.15", "intl": "^1.2.5", "jquery": "^3.2.1", "ng-chartist": "^1.1.1", "ng2-charts": "^1.6.0", "ng2-dragula": "^1.5.0", "ng2-file-upload": "^1.3.0", "ng2-img-cropper": "^0.9.0", "ng2-nouislider": "^1.7.6", "ng2-smart-table": "^1.2.2", "ng2-toastr": "^4.1.2", "ng2-validation": "^4.2.0", "ngx-chips": "^1.8.0", "ngx-flash-messages": "^1.0.4", "ngx-quill": "^2.0.4", "ngx-select-ex": "^3.5.2", "ngx-uploader": "^4.2.4", "node-sass": "^4.7.2", "nouislider": "^10.1.0", "resize-observer-polyfill": "^1.5.0", "rxjs": "^5.5.6", "screenfull": "^3.3.1", "sweetalert2": "5.3.8", "videogular2": "^6.0.1", "web-animations-js": "^2.2.5", "zone.js": "^0.8.18" }, "devDependencies": { "@angular/cli": "^1.7.4", "@angular/compiler-cli": "^5.1.2", "@angular/language-service": "^5.1.2", "@types/core-js": "^0.9.43", "@types/jasmine": "^2.8.2", "@types/node": "^8.5.2", "codelyzer": "^4.0.2", "jasmine-core": "^2.8.0", "jasmine-spec-reporter": "^4.2.1", "karma": "^2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.3.1", "karma-jasmine": "^1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "^5.2.2", "ts-node": "^4.1.0", "tslint": "^5.7.0", "typescript": "^2.5.3" } }
These are the packages I am using
Please advise. :)
Tried ngx-uploader and everything is working fine. Except that in the Console I never get to see 'done' from 'onUploadOutput' even though the file is moved onto the server and the server responds 200 with a JSON body?! Am I missing something?