Bug: file browser upload not limited to .gcode #59

Closed
opened 2026-06-17 01:09:58 +02:00 by gangoke · 3 comments
Contributor

Oversight by me. File browser upload should only allow .gcode
I was able to upload a jpg 🤦

Oversight by me. File browser upload should only allow .gcode I was able to upload a jpg 🤦
gangoke changed title from Bug: file browser upload not limited to. gcode to Bug: file browser upload not limited to .gcode 2026-06-17 01:10:46 +02:00
Owner

Fixed in v0.9.25, thanks @gangoke! 👍

The accept=".gcode,.bgcode" attribute on the file picker was only a hint and got bypassed by drag & drop entirely. Uploads are now validated both client-side and (authoritatively) server-side in the upload endpoint — only .gcode, .gcode.3mf, .3mf and .bgcode are accepted, anything else is rejected with a 400. Verified that a JPG now gets refused while a real .gcode still uploads fine.

Fixed in v0.9.25, thanks @gangoke! 👍 The `accept=".gcode,.bgcode"` attribute on the file picker was only a hint and got bypassed by drag & drop entirely. Uploads are now validated both client-side and (authoritatively) server-side in the upload endpoint — only `.gcode`, `.gcode.3mf`, `.3mf` and `.bgcode` are accepted, anything else is rejected with a 400. Verified that a JPG now gets refused while a real .gcode still uploads fine.
Author
Contributor

I don;t think we can print using a .3mf can we?

I don;t think we can print using a .3mf can we?
viewit added the
bug
label 2026-06-23 14:02:38 +02:00
Owner

Good catch @gangoke — you are right. The Kobra X cannot print .3mf files directly, so allowing them to be uploaded was misleading at best. The server-side validation has been tightened to only accept .gcode and .bgcode; .3mf and .gcode.3mf are now rejected. Will ship with the next release.

Good catch @gangoke — you are right. The Kobra X cannot print `.3mf` files directly, so allowing them to be uploaded was misleading at best. The server-side validation has been tightened to only accept `.gcode` and `.bgcode`; `.3mf` and `.gcode.3mf` are now rejected. Will ship with the next release.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: viewit/KX-Bridge-Release#59
No description provided.