便于选择
accept(MDN, n.d.-a)、capture(MDN, n.d.-b)、照片选择器(Android Developers, n.d.)。移动表单可用性。
进度与失败
进度显示(Myers, 1985;Harrison et al., 2010)与进度指示器,支持续传和重试。
错误与安全
内联验证(W3C, 2023),服务器再检查(OWASP Foundation, n.d.)。
常见问题
- 何时说明限制?
- 事先及选择后。
- 浏览器检查够吗?
- 不够,需服务器检查。
来源核查日期:2026-10-27
参考文献
- MDN Web Docs. (n.d.-a). <input type="file">. accept与multiple属性。
- MDN Web Docs. (n.d.-b). HTML attribute: capture. 直接打开相机。
- OWASP Foundation. (n.d.). File upload cheat sheet. 上传安全规范。
- Android Developers. (n.d.). Photo picker. 免权限选择。
- Myers, B. A. (1985). The importance of percent-done progress indicators for computer-human interfaces. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (pp. 11–17). ACM. 进度指示研究。
- Harrison, C., Yeo, Z., & Hudson, S. E. (2010). Faster progress bars: Manipulating perceived duration with visual augmentations. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (pp. 1545–1548). ACM. 感知时长实验。
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. 3.3.1标准。
