-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
p-fileupload onBeforeSend not working properly. #7741
Comments
onBeforeSend seems bugged further then just the headers not being exposed. The comment on the function that emits onBeforeSend says Using onBeforeUpload seems to allow you to customize the formData but doesn't expose customizing headers. To expose the headers you need to make the header a generic object since using Angulars HttpHeader object doesn't update the reference emitted when calling append (it creates a new header obj).
I can PR it if I get time, otherwise anyone else feel free to. Maybe emitting an entire RequestOptions obj instead of headers would fix the reference issue mentioned before. |
Closed PR. |
I'm submitting a ...
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-8qbdgu
Current behavior
onBeforeSend event of p-fileupload has no xhr object to add headers.
Expected behavior
onBeforeSend event of p-fileupload has should have a xhr object to add headers, as the documentation states in it's event definition: "Callback to invoke before file send begins to customize the request such as adding headers.".
What is the motivation / use case for changing the behavior?
I need to add a custom header on the upload request.
Browser: [all]
Language: [all]
The text was updated successfully, but these errors were encountered: