Make QUploader provide support for websockets or better yet make it transfer mechanism agnostic
Feature Request
QUploader sounds awesome (although I haven't seen an actual demo of it yet). Problem for me is that it only supports xhr file uploads. That's no good for my app, which is websocket-driven.
Ideally the QUploader should provide the ability to plugin whatever transfer mechanism one desires (including axios) instead of being hard-wired to it's own xhr functions.
This will open the door for better file transfers (websockets are better at streaming) and large file transfers.
In my case I'm trying to work with QEWD, which is a WS app framework built ontop of Express (for NodeJS). So ideally I'd like that framework to be able to send the websocket message, rather than having some hard-wired websocket support within QUploader.
It would be best if the implementer has the option of which transport library to use. Perhaps easiest via some sort of required interface methods or API.
This would probably also need the __add method to have the option of using various FileReader formats as reader.readAsDataURL(file) is not as good as reader.readAsArrayBuffer(file) for websockets. See this article: https://www.accelebrate.com/blog/file-uploads-web-sockets-part-3-of-3/
I spent about 2 hours editing this file: /node_modules/quasar-framework/src/components/uploader/QUploader.vue only to eventually discover that changes I make in those file have no impact whatsoever. I can even delete the entire contents of the file and Quasar happily recompiles as if nothing has happened.
I wish I could say I'd found something pithy to add to the investigation at least. I did try sending the files to the back-end via a websocket message but got an error saying "authorisation header missing", which basically means it didn't receive the token. I think that's probably because the file was not sent as in readAsArrayBuffer format and probably exceeded some sort of size threshold before the token could be sent through.
Don't really know. I'm trying to stitch all these things together and all I'm achieving is stitching myself up!
To make changes to the framework its best to just fork and have a local repository. After the framework compile, copy the dist folder to the node_modules folder of the project your working on and restart dev/compile. Seems the quasar-cli uses the dist folder instead of the src for dev/compile for speed which makes sense.
I have not quite figured out how to get "quasar dev" mode to use another fork for testing yet. If anyone can explain that process, testing would be soooo much faster!
Thanks
Developing on Quasar: "yarn dev" or "npm run dev" inside of the Quasar repo. Starts up a dev server with an app linked to Quasar code from '/dev'. All pages are test cases. Any change to Quasar code is reflected immediately through HMR. No need to init an app then build Quasar, copy distributables etc etc.
@rstoenescu I get what your saying. However if I have a full application I'd like test adjustments to the framework on is there a way to point that apps quasar-framework to a specific fork I've built? Maybe extendWebpack or chainWebpack re-configuration?
I think this is what @nothingismagick quasar-dev-seed purpose is.... Which would be useful if I wasn't stuck in windows :)
Thanks guys, I really appreciate your hard work in making this a fantastic vue framework. Its been a real challenge for me to learn SPA/GIT/npm/webpack/etc/etc. I'm a very old school oracle programmer and this is a VERY deep hole I've jumped in :)
@Lou-Der Fork Quasar main repo, make changes, "yarn build" or "npm run build" then copy /dist folder content into your project's folder node_modules/quasar-framework/dist. Warning! If you run any npm or yarn commands after this the content of node_modules might get reset to its default. On linux or mac, this would have been much easier, since you can make a symlink in node_modules/ (that replaces current node_modules/quasar-framework folder) pointing to your Quasar fork folder.
But I fail to see how you can develop something in this fashion, since on any change you need to repeat the steps above. That's why you can create a new dev page in /dev (Quasar repo fork) and test it out while you develop it.
QUploader is transfer-agnostic now through upload-factory in upcoming v0.17.