formData can be of type string or blob. The check here only checks for Files so you don't allow for all Blob types. This results in Blobs being validated as objects and going through the Object path, which gets JSON.stringify() and renders them as empty objects on the server.
} else if (value instanceof File) {
formData.append(key, value);
}
add these checks to fix: value instanceof Blob || toString.call(value) === "[object Blob]"; instead of value instanceof File the proceeding change will check for Files & Blobs.
formData can be of type string or blob. The check here only checks for Files so you don't allow for all Blob types. This results in Blobs being validated as objects and going through the Object path, which gets JSON.stringify() and renders them as empty objects on the server.
Code Here: https://github.com/Code-Forge-Net/remix-hook-form/pull/41/files#diff-4f4a4192cd629d907783a6baf48c530f39d6a43181dd3515cc46231868e0ed08R155-R156
add these checks to fix:
value instanceof Blob || toString.call(value) === "[object Blob]";
instead ofvalue instanceof File
the proceeding change will check for Files & Blobs.