0

I have a Django site with a little Jquery script that changes some images when the user puts the curser over the image and then changes it back when the cursor leaves the area. This is my first time trying to deploy a Django site and I am using amazon s3 to host the images.

So the site loads correctly and displays the original images, but the original images are linked to in my base.html file - the jquery itself seems to be working correctly, but I get 404 errors for all of the images that the jquery is responsible for. So when I put the cursor over the image and the jquery script is supposed to change it to a different image,I just have a bunch of 404 errors instead of the images, but the images are in my bucket.

All of this worked perfectly in development but I'm not sure what I need to be doing differently in production.

I have a CORS configuration file as such:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <CORSRule>
        <AllowedOrigin><mydomain.com></AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>
2
Contributors
1
Reply
6
Views
4 Years
Discussion Span
Last Post by paulkd
0

Presumably you are using developer tools to see the 404s. What are the 404 urls? have you tried manually loading (copy / paste) the 404 urls?

I have no experience with Django or s3.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.