gpt4 book ai didi

jquery - BlueImp 文件上传失败

转载 作者:行者123 更新时间:2023-12-03 22:56:25 37 4
gpt4 key购买 nike

当我尝试使用 blueImp 上传时,打开控制台时出现以下错误:

Uncaught TypeError: Cannot read property 'parseMetaData' of undefined

附有堆栈跟踪。看来我正在调用没有文件的上传逻辑。有什么办法可以获取更多信息吗?

最佳答案

确保包含 JS 脚本 https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js在任何文件上传脚本之前。 parseMetaData 需要此文件功能。

<script>包含应按以下顺序,该顺序直接取自 https://blueimp.github.io/jQuery-File-Upload/ 中的示例。 .

<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
<script src="//blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
<script src="//blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="js/jquery.iframe-transport.js"></script>
<!-- The basic File Upload plugin -->
<script src="js/jquery.fileupload.js"></script>
<!-- The File Upload processing plugin -->
<script src="js/jquery.fileupload-process.js"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="js/jquery.fileupload-image.js"></script>
<!-- The File Upload audio preview plugin -->
<script src="js/jquery.fileupload-audio.js"></script>
<!-- The File Upload video preview plugin -->
<script src="js/jquery.fileupload-video.js"></script>
<!-- The File Upload validation plugin -->
<script src="js/jquery.fileupload-validate.js"></script>
<!-- The File Upload user interface plugin -->
<script src="js/jquery.fileupload-ui.js"></script>

关于jquery - BlueImp 文件上传失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31410740/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com