Unable to upload commissioning script in the UI

Bug #1896179 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned
maas-ui
Fix Released
Unknown

Bug Description

I tried to upload the following script in the UI but was given an error that it is the wrong type. I was able to use the command line to upload the script just fine.

Browser: firefox-80.0.1+build1-0ubuntu0.20.04.1

Tags: ui
Revision history for this message
Lee Trager (ltrager) wrote :
Changed in maas-ui:
importance: Undecided → Unknown
Lee Trager (ltrager)
Changed in maas:
milestone: 2.9.0b2 → 2.9.0b3
milestone: 2.9.0b3 → 2.9.0b4
Revision history for this message
Kit Randel (blr) wrote :

This only seems to occur on ubuntu curiously. I'm of two minds about this, but do wonder if removing the mimetype check entirely is the right thing to do. It's a minor convenience, but clearly a source of weird bugs.

Revision history for this message
Kit Randel (blr) wrote :
Revision history for this message
Kit Randel (blr) wrote :

Based on this discussion in this thread (https://github.com/react-dropzone/react-dropzone/issues/276), it seems mimetype resolution is simple unreliable in browsers cross platform. I'm going to propose a branch simply removing this restriction as it is only marginally useful. This means of course that users will be able to upload files that are not scripts, but given our users are technical, I think we can expect them to do the right thing.

Kit Randel (blr)
Changed in maas:
status: New → In Progress
Kit Randel (blr)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas-ui:
status: New → Fix Released
Lee Trager (ltrager)
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

renaming script to .txt makes it work on the web interface too.

The JS file is checking for:
accept: "text/*, application/x-csh, application/x-sh",

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.