Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rbartley
Specialist II
Specialist II

Adding Mime Type using qlik.callRepository in mashup

Hi everyone,

I am new to using the Repository API and am trying to get rid of some annoying error messages associated with the fonts of type woff2 which come with Bootstrap.  Currently, I receive an error in my mashup:

woff2 error.png

I have been advised that to remove these, I would need to register the woff2 MIME type, so I have added a couple of lines to my script:

qlik.callRepository('/qrs/extension/schema','GET').success(function(reply) {

alert(JSON.stringify(reply));

});

qlik.callRepository('/qrs/mimetype','POST',{"mime":"font/woff2", "additionalHeaders": "header1","binary": false }).success(function(reply) {

alert(JSON.stringify(reply));

});

While the first (GET) command works as expected (this was just a test to make sure that I could interact with the Repository API), the second returns an error:

callRepository error.PNG

Does anyone have any ideas how to resolve this?

3 Replies
Anonymous
Not applicable

Hi Richard,

You have to check whether from your machine: Allow Control- Allow Origin: *  .......You install the chrome extension for the same.. Try after wards...

rbartley
Specialist II
Specialist II
Author

Sorry Sandeep, I don't understand your comment.  Are you saying that everyone who views the mashup would have to install a Chrome extension?  If so, this is not a viable option.

Anonymous
Not applicable

Hello Richard,

That's not viable option. I do agree. Just said to have check that option. As per your screenshot some problem  in POST repository call which requires proper authentication.