gedankenstuecke/oh_data_uploader

View on GitHub

Showing 2 of 4 total issues

Function uploadFile has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function uploadFile(fle,metadata) {
  makeRequest({
    method: 'POST',
    url: "https://www.openhumans.org/api/direct-sharing/project/files/upload/direct/?access_token="+access_token,
    headers: {
Severity: Minor
Found in static/upload.js - About 1 hr to fix

    Function makeRequest has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function makeRequest (opts) {
      return new Promise(function (resolve, reject) {
        var xhr = new XMLHttpRequest();
        xhr.open(opts.method, opts.url);
        xhr.onload = function () {
    Severity: Minor
    Found in static/upload.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language