Unable to "Upload" Plug-ins via Datameer GUI

Problem

As a user, I am attempting to upload a custom plug-in to Datameer.  When I follow the wizard from the Administration's Plug-in page, select my <plug-in>.zip file, the "Upload" button will not become active.  

We have observed that Windows users are failing to pass the validation provided by 'application/zip' as that MIME time is not supported on Window's based web browsers.

 

Cause

This is due to the MIME type ('application/zip') that is being used to determine the file type of your proposed upload.  Specifically, the following JavaScript file contains the suspected function:

<INSTALLDIR>/webapps/conductor/js/pages/admin/plugins/upload-plugin/upload-plugin-view.js

The function in question:

checkUploadButton: function (event) {
  this.file = event.currentTarget.files[0];
  if (this.file && this.file.type === 'application/zip') {
    this.submitButton.prop('disabled', false);
  } else {
    this.submitButton.prop('disabled', true);
  }
}

 

Solution

To workaround this issue, simply edit the aforementioned JavaScript file and remove the '&&' condition that checks for 'this.file.type'.  The newly updated function should look as follows:

checkUploadButton: function (event) {
  this.file = event.currentTarget.files[0];
  if (this.file) {
    this.submitButton.prop('disabled', false);
  } else {
    this.submitButton.prop('disabled', true);
  }
}

This issue is resolved in Datameer 5.9.4 and later. A maintenance fix may be available for earlier Datameer versions as well.

If required, please contact Datameer Support for more information.