Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Image url 404 error in img tag

Strange problem!!

I am trying to display an image in my laravel application after an ajax call.

 $.ajax({
                url:$(this).attr('action'),
                method:"post",
                processData:false,
                contentType: false,
                data:data,
                success:function (data) {
                   console.log(data.url);
                   $('#cropped-image').attr('src', encodeURI(data.url));

                 }

But i got 404 error in console however when i open the url in browser it will download the image.

Image is upload via s3 direct browser upload

<form id="upload" action="//s3-us-west-2.amazonaws.com/lambdacushbu" method="POST" enctype="multipart/form-data">

    <input type="hidden" name="Content-Type" value="" />
<input type="hidden" name="acl" value="private" />
<input type="hidden" name="success_action_status" value="201" />
<input type="hidden" name="policy" value="eyJleHBpcmF0aW9uIjoiMjAxNy0wMy0yN1QxNDozODoyMloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJsYW1iZGFjdXNoYnUifSx7ImFjbCI6InByaXZhdGUifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0sWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMCw1MjQyODgwMDBdLHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAxIn0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpVNDVUN1VXU1hCR1NZSUFcLzIwMTcwMzI3XC91cy13ZXN0LTJcL3MzXC9hd3M0X3JlcXVlc3QifSx7IngtYW16LWFsZ29yaXRobSI6IkFXUzQtSE1BQy1TSEEyNTYifSx7IngtYW16LWRhdGUiOiIyMDE3MDMyN1QwODM4MjJaIn1dfQ==" />
<input type="hidden" name="X-amz-credential" value="AKIAJU45T7UWSXBGSY/20170327/us-west-2/s3/aws4_request" />
<input type="hidden" name="X-amz-algorithm" value="AWS4-HMAC-SHA256" />
<input type="hidden" name="X-amz-date" value="20170327T083822Z" />
<input type="hidden" name="X-amz-signature" value="2b89cf3b21de2a118f24c0f9b8463025615d302f86ee85047adc9bbf0cccee97" />
<input type="hidden" name="key" value="${filename}" />
    <input type="file" name="file" id="image">
    <br>
    <input type="submit" value="upload" name="upload">
        <span id="status-text"></span>
</form>

anonymous read permission is added to the bucket policy page

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!