Skip to content

Commit c060648

Browse files
authored
docs: remove outdated note about remix (#223)
1 parent 2e5617f commit c060648

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

docs/file-upload.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,6 @@ function Example() {
5151
}
5252
```
5353

54-
<details>
55-
<summary>If you are running a Remix app on `node`:</summary>
56-
57-
Currently, there is a [bug](https://github.com/remix-run/web-std-io/pull/28) on **@remix-run/web-fetch** which treats the default file entry as an empty string. If you want to share the same validation across client and server, you can preprocess it with zod like below:
58-
59-
```tsx
60-
const schema = z.object({
61-
file: z.preprocess(
62-
// Transform the empty string to a default file entry
63-
(value) => (value === '' ? new File([], '') : value),
64-
z
65-
.instanceof(File)
66-
.refine(
67-
(file) => file.name !== '' && file.size !== 0,
68-
'File is required',
69-
),
70-
),
71-
});
72-
```
73-
74-
</details>
75-
7654
## Multiple files
7755

7856
There are some caveats when validating a multiple file input:

0 commit comments

Comments
 (0)