I don't see the file data gets sent to server from your POST request.
// object post doesn't have the file data await POST(ENDPOINTS.CREATE_POST, post);
Consider using FormData
const submitHandler = async (e) => { e.preventDefault(); const post = new FormData(); // non form data formData.append("author_firstname", JSON.parse(localStorage.getItem("user")).user_firstname); ... // form data formData.append("image", document.getElementById("image").files[0]); ... // POST request await POST(ENDPOINTS.CREATE_POST, post); // document.location.reload() };