Check out the files inside src/App.tsx
, src/OptionOne.tsx
and src/OptionTwo.tsx
to see how to upload a file to Greengage API using the fetch API and forms.
Also here is a link to a resource describing all the different ways how to upload a file with regular JS.