• Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

96
Views
"401 Unauthorized" while rendering an image

I'm getting "401 Unauthorized" when I try to render or download images in a browser in product cards which is templated by EJS. I guess I should send an access token with GET request when I try to access the image to pass authorization but I don't know how to do it. Thanks in advance!

<body>
<% productsCollection.forEach(item => { name = item.name, price = item.salePrices[0].value / 100 + " AZN", itemID = item.id, image = item.customImageLink %>
<div class="card" style="width: 18rem;">
        <img src="<%= image %>" class="card-img-top" alt="...">
        <div class="card-body">
          <h5 class="card-title"><%= name %></h5>
          <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
          <a href="#" class="btn btn-primary"><%= price %></a>
        </div>
      </div>
 <% }) %>
</body>
9 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.