bleenco / ngx-uploader

Angular File Uploader
https://ngx-uploader.jankuri.me
MIT License
756 stars 348 forks source link

ngx-uploader - UploadInput event url with local proxy.conf #553

Closed antoinecandy closed 2 years ago

antoinecandy commented 2 years ago

Hi,

I'm trying to use ngx-uploader with a local proxy config on my angular project.

The thing is that when I set the url of the UploadInput event as follow, it makes the request on http://localhost:4200/api and not on my targeted proxy conf url (http://localhost:9335/whitelabel/v2):

startUpload(): void { let event: UploadInput; event = { type: 'uploadFile', url: "/api/subscritions/subscription_ref123/evidences/evidence_ref123", method: 'POST', file: this.files[0] }; this.uploadInput.emit(event);

So I tried to set the event url with "http://localhost:9335/whitelabel/v2" but it trigger a cors error :'(

Is there any option for the UploadInput Event to use the local proxy.conf of the angular project ? Or is there another way to achieve the redirection without having a cors error ?