@Eventyret 's answer helped me resolve this issue because I am using angular with strapi, and I have searched all over the internet. The solution was actually to use a proxy. I got mine from Angular follow the instructions changing /api to /uploads and that was it.