-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading GCODE file from URL #11
Comments
Sorry, modern browser security prevents cross site requests, so there is no way to implement loading from url without server side. I have no plans on making that viewer server dependent. |
Thanks for replying. I needed to load the file from within the same On 10/7/2013 10:55 PM, Alex Ustyantsev wrote:
|
Could you share your code snippet how to load gcode from an URL? Many thanks in advance! |
Lines 187 to 209 contain the added code: http://ideone.com/5oTp9e You can run it from the browser javascript console using: GCODE.gCodeReader.loadUrl("http://localhost/gCodeViewer/model.gcode"); |
Thanks a lot! Unfortunately it's not working. Are you still using it? And on what commit of gCodeViewer? I will give some extra info below in case you wouldn't mind reading it and have a quick solution, but with no means I expect you to invest time in it and fix my issues of course. The latest commit gives me a "gcode.match is not function" error in detectSlicer and a js syntax error on the gcode file itself (as if the browser tries to interpret it as a javascript?). |
Here's a copy of the code I used: http://jbcse.com/downloads/gCodeViewer.zip http://i.imgur.com/rFpgwRj.png Here's a demo page: http://jbcse.com/projects/gCodeViewer-from-URL/ Enter into the console: GCODE.gCodeReader.loadUrl("thin-wall.gcode"); |
Thanks mate, stupid of me I didn't check Chrome, works like a charm there, but not in FF, so it was a browser issue. |
Any ideas on how to load the GCODE from a URL?
The text was updated successfully, but these errors were encountered: