Hello everyone, greetings. I would like to know ho...
# suitescript
a
Hello everyone, greetings. I would like to know how I can access a media file via script by adding it to an external link. I'm loading it from a Suitelet using the public URL (without login), but I'm encountering this console error. scriptlet.nl:1 Access to XMLHttpRequest at 'https://7067352-sb1.app.netsuite.com/core/media/media.nl?id=15579&c=7067352_SB1&h=GyGcwcnLfnS9NWCfcjBji8Ttk2kbyhmRI7WnE&_xt=.cer' from origin 'https://7067352-sb1.extforms.netsuite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
b
use a html element like img
a
but is not a img, it is a .pem file a public key 😅
b
you wouldnt even want to display that to the user, you can just load the file in the suitelet and put the public key in a hidden text field