danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.59k forks source link

Unhandled rejection 401 - OPTIONS #2017

Closed alexandroscgb closed 6 years ago

alexandroscgb commented 6 years ago

I'm trying to upload a file to REST endpoint in Spring, but it always says: Possibly unhandled rejection: OPTIONS 401: unauthorized, and then the parameters of the operation. This endpoint service is a POST one, and it looks like UPLOAD is trying the OPTIONS method.

The endpoint says that 3 authentication parameters, are not present, even though they are.

Any ideas? Thanks.

alexandroscgb commented 6 years ago

Nevermind. I put the parameters as another variable inside the Upload.upload method and worked like a charm.

Thanks, great library,