This is a migrated thread and some comments may be shown as answers.

KENDO jQuery PDF EXPORT AWS S3 CORS

1 Answer 540 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pedro henrique
Top achievements
Rank 1
pedro henrique asked on 29 Jan 2021, 12:59 PM

Hi there, I am posting here to see if the community can to help me.

I am facing an issue where the PDF Export is, apparently, not working properly neither with MS Edge (88.0.705.53) nor on Chrome ( 88.0.4324.104 ), but is working fine on Firefox (84.0.1). When I try to generate the PDF with pictures that are stored on AWS S3 it throws CORS' errors to the Edge/Chrome console as you can see by the attached picture. When I generate the PDF from Firefox it works like charm.

 

 

I have read the AWS S3 CORS documentation (https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/cors.html), I have read the Mozilla documentation (Cross-Origin Resource Sharing (CORS) - HTTP | MDN (mozilla.org)), I have adjusted  my CORS and nothing. 

I have opened a ticket to the support and no one has being able to guide me or fix the issue that happens only on Edge/Chrome.

My CORS configuration, for this test purpose, is like this:

[
    {
        "AllowedHeaders": [
            "*", 
            "Authorization"
        ],
        "AllowedMethods": [
            "HEAD",
            "GET",
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [
            "ETag",
            "x-amz-meta-custom-header",
            "x-amz-server-side-encryption",
            "x-amz-request-id",
            "x-amz-id-2",
            "x-amz-delete-marker",
            "Accept-Ranges",
            "Content-Range",
            "Content-Encoding",
            "Content-Length",
            "Content-Type",
            "Content-Language",
            "Expires",
            "Date",
            "Server",
            "Access-Control-Allow-Origin",
            "Last-Modified",
            "Pragma",
            "XMLHttpRequest",
            "Server",
            "Cache-Control",
            "Authorization"
        ],
        "MaxAgeSeconds": 3000
    }
]

I created a DOJO (https://dojo.telerik.com/iMITUZuY/2) that proves that it works on Firefox but does not work on Edge/Chrome. 

So, I would be grateful if anyone can help me solving this.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 02 Feb 2021, 08:40 AM

Hi Pedro,

I have supplied an answer in your other support thread on the same topic that suggests a solution for the issue by utilizing the crossorigin attribute as follows:

<img crossorigin="anonymous" src="..." />

With this modifications, images are now being successfully printed in Chrome and Edge as well:

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
pedro henrique
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or