我正在使用Blueimp File Upload,我怎樣才能限制上傳到最後選擇的單個元素或(拖拽)?我已經從輸入表格中刪除了multiple
屬性,並將maxNumberOfFiles
選項設置爲值1
,但是如果第一次上載失敗(由於選項maxFileSize
或acceptFileTypes
),第一個元素將停留在所列出的選定文件的頂部(由模板生成)並且其他文件無法上傳,因爲它們侵犯了maxNumberOfFiles
選項。我希望如果一個接受的文件被上傳和/或刪除,而不是被追加,它會替換舊的(不被接受的)文件。我還想,當多個文件被刪除但只有第一個文件時,模板從不會打印多個文件。Blueimp文件上傳:單個文件上傳
10
A
回答
10
變更輸入標籤從:
<input type="file" name="files[]">
到:
<input type="file" name="file">
3
另外改變所述多個屬性文件陣列和刪除多屬性:
<input id="fileupload" type="file" name="files[]" multiple>
到:
<input id="fileupload" type="file" name="file">
4
卸下:如果從
<input type="file" multiple="" name="file">
設置爲
<input type="file" name="file">
相關問題
- 1. 使用blueimp上傳文件上傳東西blueimp文件上傳
- 2. 使用blueimp文件上傳單個文件上傳問題
- 3. blueimp多個文件上傳
- 4. 多文件上傳 - Blueimp jQuery上傳
- 5. BlueImp/jQuery文件上傳
- 6. Blueimp多文件上傳
- 7. Blueimp文件上傳和Codeigniter
- 8. Blueimp文件上傳問題
- 9. blueimp jquery文件上傳WordPress
- 10. Blueimp文件上傳插件,進度條完成文件上傳
- 11. 如何取消上傳單個文件,使用Blueimp jQuery文件上傳
- 12. 從blueimp文件上傳器獲取所有上傳的文件
- 13. Blueimp文件上傳器 - Chrome文件夾上傳限制
- 14. Blueimp Bootstrap文件上傳 - 檢測尚未上傳的文件
- 15. 自定義文件上傳按鈕與blueimp jquery文件上傳
- 16. jquery文件上傳(blueimp) - 文件上傳按ID編號
- 17. jQuery:文件+數據上傳使用Blueimp文件上傳插件表單提交
- 18. 第一次在blueimp上傳文件不上傳Jquery文件上傳
- 19. BlueImp文件上傳插件不工作
- 20. 在blueimp文件上傳的jQuery插件
- 21. 一次在blueimp中上傳一個文件jquery上傳
- 22. Blueimp文件上傳:上傳前從文件列表中刪除文件
- 23. Blueimp jquery文件上傳 - 上傳文件在不同的文件夾
- 24. Blueimp文件上傳插件僅上傳一次
- 25. 無法中止上傳關於blueimp文件上傳插件
- 26. 遠程上傳(使用blueimp文件上傳插件)
- 27. blueimp文件上傳。如何清理現有的文件清單
- 28. Jquery Blueimp文件上傳回調
- 29. BlueImp jQuery文件上傳和ModSecurity錯誤
- 30. 分塊文件上傳與blueimp和oneuploaderbundle
您使用的UI版本或基礎插件?向我們展示您的代碼! –
我正在使用Basic Plus UI插件。如[插件常見問題解答]中所述(https://github.com/blueimp/jQuery-).html中輸入標記 「文件上傳/維基/常見問題解答) – itwebdeveloper
你解決了這個問題嗎?如果是這樣,請幫助!謝謝! – laviku