uniapp的uniuploadFile的成功回调参数里面显示statusCode 500 data null succeeded false errors SystemDrawingCommon is not supported on non-Wind…mssystemdrawingnonwindows for more information extras null …是什么问题
根据给出的信息,uni.uploadFile方法的成功回调参数显示statusCode: 500, data: null, succeeded: false, errors: "System.Drawing.Common is not supported on non-Wind….ms/systemdrawingnonwindows for more information.", extras: null,这表示上传文件时遇到了问题。错误信息显示"System.Drawing.Common is not supported on non-Windows platforms",意味着在非Windows平台上不支持System.Drawing.Common库。这可能是因为uni.uploadFile方法内部使用了System.Drawing.Common库来处理上传的文件,但该库在非Windows平台上不可用。
为了解决这个问题,你可以尝试以下几个方法:
- 确保你的应用运行在支持System.Drawing.Common库的Windows平台上。
- 检查uni.uploadFile方法的调用是否正确,确保传递给该方法的参数正确无误。
- 如果你的应用需要在非Windows平台上运行,那么你需要寻找其他方式来处理文件上传,可能需要使用其他的库或技术来替代System.Drawing.Common库的功能。
- 如果你使用的是uni-app的跨平台框架,可以尝试查找相关的插件或组件,看是否有其他人已经解决了这个问题或提供了替代方案。
总之,这个问题的解决方案取决于你的具体应用环境和需求,你需要根据实际情况来选择适合你的解决方案
原文地址: https://www.cveoy.top/t/topic/iE2v 著作权归作者所有。请勿转载和采集!