Skip to content

Feature request: support drag&drop of files from Fluidd when running as embedded iFrame #34

@MarSoft

Description

@MarSoft

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 on dataTransfer.files object but also call dataTransfer.getData('text') and check if the result looks like a URL (starts with either http:// or https://).

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 fluidd-core/fluidd#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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions