Open MarSoft opened 11 months ago
@MarSoft - how did you get PGC to show up as a webcam? Notably, I'm running MainSail instead of Fluidd, but shouldn't they both handle it the same if PGC is running as a "webcam"?
Nevermind, I found where Fluidd handles this. Looks like it's a Fluidd-only thing unless I can hack it together myself.
I've configured pgcode as a "webcam" within my Fluidd instance. It shows nice, but when I drag&drop the file from File Browser window to PrettyGCode frame, nothing happens. It would be nice to be able to open files by URL using drag&drop, not just local files. This can be done by changing
drop
event handler to not only rely ondataTransfer.files
object but also calldataTransfer.getData('text')
and check if the result looks like a URL (starts with eitherhttp://
orhttps://
).Support for drag&drop from Fluidd would also require a change on the Fluidd side — for now it does not add file URL to the drag&drop event; I've posted it at https://github.com/fluidd-core/fluidd/issues/1202 But the change I've described will let you to drag&drop any hyperlink to Gcode file (provided that the server gives permissive CSRF headers).