We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Headers are missing in ImageSuccessEventArgs.Response

I tried to follow the syncfusion article here to rename images before inserting. I am using blazor webassembly. However, the response object from the ImageSuccessEventArgs is missing the headers. Why are these headers missing? Please see the screenshots below to see what I mean. Is there maybe another way to change the name of an image based on the server response?

2023-02-01 15_39_10-Window.png

2023-02-01 15_39_55-Window.png

3 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team February 2, 2023 08:16 AM UTC

Hi Samuel,

Greetings from syncfusion support,

We have validated the issue and confirmed that the image headers are being returned properly. To assist you better, I would like to request some additional information.

Could you please provide the following details to help us validate further:

  • The nuget version you are using
  • The process or method used to add the header to the response on the server

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebAssembly_RTE_Image_header-132854398

Server end header added:


Response.Headers.Add("name", imageFile);



We are here to help and would appreciate any information that can assist us in resolving this issue for you.



SE Samuel Egger replied to Indrajith Srinivasan February 2, 2023 10:18 AM UTC

Thank you for your fast reply and the sample. It turned out that the issue is because of a cross origin request (the endpoint for the image upload is on another domain). JavaScript, however, can only access a couple of headers in that case. Thats why my name header is missing. I can try to work around it by abusing the content-type header for the image name. This is ugly but might work.

It would be good if you can make the response body accessible through the ImageSuccessEventArgs.Response object and not only the headers. Is that something you can do for a future update?

IS Indrajith Srinivasan Syncfusion Team February 3, 2023 02:37 PM UTC

We are glad that the headers are now returned properly. Regarding the response body return in imageSuccessEventArgs, since we have integrated syncfusion uploader component for the image upload action. We have already logged “Provide support for catch the returned response body in uploader component” as a feature request, and this support will be included in any one of our upcoming releases.

You can track the status of this feature from the below feedback link.

Feedback Link: https://www.syncfusion.com/feedback/36284

Marked as answer
Live Chat Icon For mobile
Up arrow icon