瀏覽代碼

add remarks about allowedFileTypes to the post

Artur Paikin 7 年之前
父節點
當前提交
eae77ea8dc
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      website/src/_posts/2017-05-0.17.md

+ 2 - 0
website/src/_posts/2017-05-0.17.md

@@ -53,6 +53,8 @@ restrictions: {
 
 
 Translation: allow only images and videos of any type, minimum 2 and maximum 5 files must be selected, less that 300 KB.
 Translation: allow only images and videos of any type, minimum 2 and maximum 5 files must be selected, less that 300 KB.
 
 
+`allowedFileTypes` must be an array of strings with supported file mime-types. Anything from this list https://www.iana.org/assignments/media-types/media-types.xhtml should work, as long as Uppy is able to detect it (Uppy promises to try hard, see below for details). Both wildcards `video/*` and specicifc types `image/jpeg` are supported!
+
 2\. Using the more advanced callbacks: `onBeforeFileAdded(currentFile, files)` that fires before a file is added, so you are free to run whatever checks you wish against the one file that is about to be added or all files currently selected / uploaded. And `onBeforeUpload(files)`, where you can check stuff before proceeding with the upload.
 2\. Using the more advanced callbacks: `onBeforeFileAdded(currentFile, files)` that fires before a file is added, so you are free to run whatever checks you wish against the one file that is about to be added or all files currently selected / uploaded. And `onBeforeUpload(files)`, where you can check stuff before proceeding with the upload.
 
 
 Basically, use the first options for the simple stuff like limiting uploads to images or 3 files. Use the second option for things like “we need users to upload 5 photos and an audio file, so we can make a short clip out of it”. Let us know if this suits your needs, we are all 👂.
 Basically, use the first options for the simple stuff like limiting uploads to images or 3 files. Use the second option for things like “we need users to upload 5 photos and an audio file, so we can make a short clip out of it”. Let us know if this suits your needs, we are all 👂.