소스 검색

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

#1822
Artur Paikin 5 년 전
부모
커밋
89b92c2309
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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: