I can successfully create the note.
I now need to upload the file and then link to the note.
Which I think I can do with this endpoint:
I'm POSTing a file using FormData from my app and handling this on my NodeJS server.
Here I use axios to call the Endpoint above.
However, whatever format I pass the file in, I get either a 400 or a 422 returned from the Sugar API.
I've tried several things:
- setting. removing / changing content-type
- setting / removing content disposition
- pass file as raw File, FormData, Buffer
// this adds in basepath and sets api version const fileUrl = getFileUrl(config, noteId) const fileResponse = await axios.post(fileUrl, file, { headers: { 'OAuth-Token': accessToken, }, });