Primeng: Use HTTPClient in FileUpload

Created on 23 Jan 2018  路  7Comments  路  Source: primefaces/primeng

[ x  ] feature request

Please change upload request from p-FileUpload to use HttpClient (Angular 4.3+),
In this case I can use interceptor to show my LoadingComponent in any upload requests.

Is better to add Bearer authentication header too.

enhancement

Most helpful comment

@cagataycivici This change broke OnUpload method. Now, event does not have the Response object coming back from server.

All 7 comments

I'm also waiting for this. It would be nice for adding headers and for using Angular HttpInterceptor.

Thanks

@cagataycivici This change broke OnUpload method. Now, event does not have the Response object coming back from server.

@cagataycivici This change broke OnUpload method. Now, event does not have the Response object coming back from server.

Same here.

That changes a lot and breaks a lot. Not a good idea to to this in a minor update ...

Same here, the method beforeUpload crash when read "event.xhr".

onBeforeSend(event) {
event.xhr.setRequestHeader('bla bla bla');
}

This is not minor update, folks. If you use .upload() method to send a file and variables to the backend and now it not works.

You can break some apps like mine.

Must agree with @jotae1e, made me a bad day too...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lilling picture lilling  路  3Comments

just-paja picture just-paja  路  3Comments

Faigjaz picture Faigjaz  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments

philly-vanilly picture philly-vanilly  路  3Comments