It only returns 403, when using GUI.HUD.showInfoPanel() parameter on passing image

I wanted to create a simple popup and it worked fine, but when I started to add a image, then typescript can’t access it from the server.

the server return always

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>NE1YRQ54KZY23M1C</RequestId>
<HostId>4JlbFYBPNO7o+aL9ONKtnP/s0h9ssFGaAvqZAosur5Po7Ag7Zaa1QnLRtVjCDsFQONM4SAsW88U=</HostId>
</Error>

I tried to set the string to 3 ways, no one works:

  1. https://i.imgur.com/InCRKqK.jpg
  2. download it, and upload it, and then get the name like “InCRKqK.jpg” (in console.log() it shows java.lang.RuntimeException: Failed to fetch https://cdn.edu.cospaces.io/uploads/InCRKqK.jpg: Error: response status: 403
  3. tried only the ID “InCRKqK”
  4. tried to put the image inside the world and activate use in codeblock and all the ways of before.

for me the 3 way is the more correct way because in typescript I can read this:

  • ...and an image via id...
  • image: 'yourImageID',
Displays a panel with title text, body text and an image via id.

text and title must be defined.

Example

GUI.HUD.showInfoPanel({
    title: 'This is the title',
    image: 'yourImageID',
    text: 'This is the body text.',
    onHide: () => Debug.log('Panel closed.'),
})

1 Like