-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue using ng-file-upload and http-auth-interceptor #113
Comments
Have the same issue. Guys have you found any solution? |
Hi guys, I am little of out scope right now, sorry for this, but may I suggest you look at the code of http-auth-interceptor to find answers for your questions? It's all just few lines of code in one file. |
Hi I have looked, but I'm not familiar with how AngularJS deals with all this internally, (and I'm still kinda new to js). Didn't find any clues first look. I can look again, but don't think I will get any further. Any hints for what it can be? |
Hi guys! https://github.com/danialfarid/ng-file-upload/blob/master/dist/ng-file-upload.js |
IMHO here is buggy code
and
Now i'm going to create new issue on ng-file-upload git |
Nice find 👍 |
@alex-training that's how the plugin listen to the progress event if you remove those lines file progress feature will be removed too |
If you guys can create a small jsfiddle showing the error I can debug it and find out where the issue is. |
@danialfarid OK, I will create jsfiddle project to reproduce this behavior |
Guys please have a look at jsfiddle https://jsfiddle.net/alexedu/4na60fpd/ You can see all errors in browser console |
Thanks @alex-training for making the jsfiddle. I have nothing to add, this is the one :) |
This is fixed at ng-file-upload#8.0.4, you can close this issue now. |
Very nice! Thank you @danialfarid for the quick fix! |
Thank you @danialfarid |
I created danialfarid/ng-file-upload#1010 yesterday for what I didnt knew if was a bug in ng-file-upload (which I need to use), or http-auth-interceptor.
Basically, I cant just use $http for calling a REST resource, because I need a file-upload capability with a progress-bar (and some other features ng-file-upload provides).
When http-auth-interceptor intercepts the 401 that ng-file-upload is triggering, I am hitting an
TypeError: Cannot read property 'addEventListener' of undefined
in ng-file-upload, because:Any idea how I can solve this problem? It happens when loginConfirmed is triggered, so I guess I need to update $http(config) at that point, but I dont know the internals of how this works, so a little push might be useful. ng-file-upload is very useful, so it would be a nice thing for http-auth-interceptor to support (or have a little doc on how to support)..
The text was updated successfully, but these errors were encountered: