POST TRUCKS WITH uploadManifest appends instead of body

PHOTO EMBED

Fri Mar 12 2021 18:19:01 GMT+0000 (UTC)

Saved by @stephanieraymos

//Fetching the trucks db from the API link above //^----POST (ADD INVENTORY)----
  const postTrucks = async () => {
    const uploadManifest = new FormData();
    uploadManifest.append("truckName", truckName);
    uploadManifest.append("truckPrice", truckPrice);
    uploadManifest.append("truckContents", truckContents);
    uploadManifest.append("truckManifest", truckManifest, truckManifest.name);
    if ((truckName != "", truckPrice != "")) {
      try {
        const response = await fetch(
          "http://143.110.225.28/api/v1/inventory/",
          {
            method: "POST",
            headers: {
              "Content-Type": "application/json",
            },
            body: uploadManifest,
          }
        );
        return response.json();
      } catch (error) {
        console.log(error);
      }
    }
  };
content_copyCOPY

Trying to get form to upload