如何将 QUploader (Quasar-Framework) 与 websockets 一起使用?

How to use QUploader (Quasar-Framework) with websockets?

QUploader 已记录 here and here is its code

我正在尝试让 QUploader(类星体框架版本 0.14.7)工作,将图像上传到外部服务器上的 featherjs 'service',基本上遵循 this example

如何将 QUploader 与 websockets 一起使用?

我尝试在没有 Quasar 的情况下使 feathersjs 上传工作,但没有用,但我能够使 Quasar 与正常的 Express multer 上传一起工作。

您只需将 :upload-factory="uploadFile" 添加到 q-uploader 组件即可。

方法是这样的:uploadFile(file, updateProgress)

您可以对文件做任何您想做的事,您可以计算进度并调用 updateProgress(calculatedProgress),calculatedProgress 从 0.0 变为 1.0。

(只要确保你有feathers-client wokring通过websockets,然后在客户端使用axios或其他东西通过websockets上传)

都解释清楚了here