About FIle Upload component, how to send file ? #3071
-
On the documentation i haven't found anything about the file upload. Do you have some example of file upload with form and without form ? Does this is related to the |
Beta Was this translation helpful? Give feedback.
Answered by
cschroeter
Nov 26, 2024
Replies: 1 comment 1 reply
-
Hey mate thanks for reaching out. The import { FileUpload } from '@ark-ui/react/file-upload'
const Demo = () => {
const handleFileAccept = (files: FileUpload.FileAcceptDetails) => {
// send files to server
}
return (
<FileUpload.Root onFileAccept={handleFileAccept} maxFiles={5}>
// ...
</FileUpload.Root>
)
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Asteb612
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Asteb612
Hey mate thanks for reaching out. The
FileUpload
component in Ark is primarily there to help your validate user input such as file size, type etc. Uploading a file to a server is something that happens on user land. for example here is how you could start: