SQLSTATE[23000]: Column 'targetId' cannot be null
I've managed to fix the issue. Originally I was converting the Blob to a File, but this was causing the upload to silently fail. So, when Craft tried to create the relation between the asset field and the image, it threw the error above.

Now, instead of converting to a file, I'm leaving the Blob as is but adding additional metadata (Last modified data &amp; name), and passing a file name to the FormData.append() when creating the FormData object.