From d43bbfb1a2497777aff278b7240c76a7c8655b53 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Fri, 1 Nov 2024 09:32:24 +0100 Subject: [PATCH] Add note about extending File (#3692) --- 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