You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 57d89f3
Browse filesBrowse the repository at this point in the historyBrowse files
|`chooseImage`| 9 | Maximum selection count for images | Used when accept is `image`|
141
+
|`chooseVideo`| 1 | Does not support multiple selection, single video file only | Used when accept is `video`|
142
+
|`chooseFile`| 100 | Maximum selection count for files | Used when accept is `all`|
143
+
144
+
::: warning H5 Platform Special Note
145
+
The behavior of the count value on the H5 platform is based on the browser's own specifications. Current test results show that it can only limit single/multiple selection, but cannot limit the specific quantity. Moreover, very few mobile browsers actually support multiple selection.
146
+
:::
147
+
148
+
### Other Platforms
149
+
150
+
Other platforms (such as Alipay Mini Program, DingTalk Mini Program, App, etc.) have relatively limited file selection capabilities:
Copy file name to clipboardExpand all lines: docs/en-US/component/use-upload.md
+81-1Lines changed: 81 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,4 +77,84 @@ abort()
77
77
| compressed | Whether to compress video | boolean | true | - |
78
78
| maxDuration | Maximum video duration (seconds) | number | 60 | - |
79
79
| camera | Camera direction | 'back' \| 'front' | 'back' | - |
80
-
| extension | Filter by file extension (H5 supports all type filtering, WeChat Mini Program supports filtering when all and file, other platforms do not support) | string[]| - |
80
+
| extension | Filter by file extension (H5 supports all types, WeChat Mini Program supports filtering when all and file, other platforms do not support) | string[]| - |
81
+
82
+
## File Selection Quantity Limits
83
+
84
+
Different platforms have different limits on file selection quantity, which are determined by the uni-app platform APIs themselves:
85
+
86
+
### WeChat Platform
87
+
88
+
| Selection Method | Max Count | Description | Use Case |
|`chooseImage`| 9 | Maximum selection count for images | Used when accept is `image`|
98
+
|`chooseVideo`| 1 | Does not support multiple selection, single file only | Used when accept is `video`|
99
+
|`chooseFile`| 100 | Maximum selection count for files | Used when accept is `all`|
100
+
101
+
::: warning H5 Platform Special Note
102
+
The behavior of the count value on the H5 platform is based on the browser's own specifications. Current test results show that it can only limit single/multiple selection, but cannot limit the specific quantity. Moreover, very few mobile browsers actually support multiple selection.
103
+
:::
104
+
105
+
### Other Platforms
106
+
107
+
| Selection Method | Max Count | Description | Use Case |
The `maxCount` parameter in `ChooseFileOption` is limited by the underlying platform APIs. Setting a value higher than the platform limit will be automatically capped to the maximum supported value.
0 commit comments