Procházet zdrojové kódy

Add info on how to restrict allowedFileTypes to a double-dot extension, such as .nii.gz

#1822
Artur Paikin před 5 roky
rodič
revize
89b92c2309
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      website/src/docs/uppy.md

+ 2 - 0
website/src/docs/uppy.md

@@ -139,6 +139,8 @@ Optionally, provide rules and conditions to limit the type and/or number of file
 
 > If you’d like to force a certain meta field data to be entered before the upload, you can [do so using `onBeforeUpload`](https://github.com/transloadit/uppy/issues/1703#issuecomment-507202561).
 
+> If you need to restrict `allowedFileTypes` to a file extension with double dots, like `.nii.gz`, you can do so by [setting `allowedFileTypes` to just the last part of the extension, `allowedFileTypes: ['.gz']`, and then using `onBeforeFileAdded` to filter for `.nii.gz`](https://github.com/transloadit/uppy/issues/1822#issuecomment-526801208).
+
 ### `meta: {}`
 
 Metadata object, used for passing things like public keys, usernames, tags and so on: