Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Thumbnail images return a 403 Forbidden when used in <img> tag on Chrome and Safari

Hello, I have an application that fetches a list of documents, elements and parts from onshape, and uses the thumbnail URLs from the list to render an <img> tag inside of it.

This is causing the images to throw a 403 error on Chrome and Safari, although they are working on Firefox. If, on the other hand, I copy the url I have and paste it in a new tab in any browser, it works fine.

Has anybody experienced something similar, and knows how to fix it?

Best regards,
Jean Damke

Comments

  • Aaron_MagninAaron_Magnin Member, Onshape Employees Posts: 78
    Did you try API support at [email protected]
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,760 PRO
    edited January 24
    403 is file not found. What's confusing me is an image from OS isn't a file it's just data. When I get an image from onshape, I'm using rest and I don't have access to the hard drive. I just render it to my page. It's never a file. Make sure you base64 the data as the internet can't handle the character set an image uses. To render the image, I use a data attribute.

    <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABA.....

    Are you trying to save an image from OS to your hard drive? To do that you'll have to set up a whole different transport.  


Sign In or Register to comment.