Image has an extension that does not match its contents -etsy demo

I am working on the etsy demo and i keep getting an error when i try to upload the image Image has an extension that does not match its contents How do i fix this . i added the validates_attachment_content_type :image, :content_type => /\Aimage\/.*\Z/ but that doesnt seem to be helping

Posted over 4 years ago by carine todmia
Posted over 4 years ago by Alex Yang

Hi Carine,

It's possible that you've included the validates_attachment_content_type line in the wrong place. You should check the Notes below the video to see the correct code you should use. Let me know if that works.

In the future, please post course-specific troubleshooting questions in the Discussion section beneath the video - thanks!

Best,
Alex

1