wikimedia/mediawiki-core

View on GitHub
resources/src/mediawiki.api/upload.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function uploadWithFormData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        uploadWithFormData: function ( file, data ) {
            const deferred = $.Deferred();

            for ( const key in data ) {
                if ( !fieldsAllowed[ key ] ) {
Severity: Minor
Found in resources/src/mediawiki.api/upload.js - About 1 hr to fix

    Function uploadChunk has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            uploadChunk: function ( file, data, start, end, filekey, retries ) {
                const api = this,
                    chunk = this.slice( file, start, end );
    
                // When uploading in chunks, we're going to be issuing a lot more
    Severity: Minor
    Found in resources/src/mediawiki.api/upload.js - About 1 hr to fix

      Function uploadChunk has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              uploadChunk: function ( file, data, start, end, filekey, retries ) {
      Severity: Minor
      Found in resources/src/mediawiki.api/upload.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status