Skip to content

File Picker: Ready for Production use? #2724

Answered by nkrantz
bsandeepan asked this question in General
Discussion options

You must be logged in to vote

Hi @bsandeepan

  1. You can apply client-side file format restrictions using the accept prop (read more about it here), but it's still recommended that you use server-side validation as well, because it's possible to circumvent the accept prop. There's no prop for size restrictions, but you can implement your own validation using the size info that you get back from the HTML element's .file property (read more about what info you can read on uploaded files here). Feel free to take a look at this CodeSandbox that demonstrates an option for how to grab that file size.
  2. Yes (our File Picker is the native HTML input type="file" with some additions for styling and accessibility)
  3. Yes (it's productio…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by nkrantz
Comment options

You must be logged in to vote
5 replies
@TheSisb
Comment options

@nkrantz
Comment options

@nkrantz
Comment options

@bsandeepan
Comment options

@SiTaggart
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants