From 6df81a4fe340498dcd7ba4b82d0136cef9fb0342 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Sat, 19 Oct 2024 13:11:52 +0200 Subject: [PATCH] Add note about extending File --- docs/advanced/persistence-and-uploads.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/advanced/persistence-and-uploads.md b/docs/advanced/persistence-and-uploads.md index 45381bca78..3f90a2a8e0 100644 --- a/docs/advanced/persistence-and-uploads.md +++ b/docs/advanced/persistence-and-uploads.md @@ -126,6 +126,9 @@ In a browser, the `File` object may often be retrieved via a [file input](https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications), for example. +> **Note:** If you are using your own version of `File` and `Blob` ensure you are properly extending the +> so it can be properly identified as a file. + The `@urql/core@4` package supports File Uploads natively, so we won't have to do any installation or setup work. When `urql` sees a `File` or a `Blob` anywhere in your `variables`, it switches to a `multipart/form-data` request, converts the request to a `FormData` object, according to the