api.js
function (projectName, files, params, callback) {
        if (callback === undefined) {
            callback = params;
            params = {};
        }

        var filesInformation = {};

        files.forEach(function (fileName) {
            var index = "files[" + fileName + "]";
            filesInformation[index] = fs.createReadStream(fileName);
        });

        return postApiCallWithFormData('project/' + projectName + '/add-file', extend(filesInformation, params), callback);
    }
function (projectName, files, params, callback) {
        if (callback === undefined) {
            callback = params;
            params = {};
        }

        var filesInformation = {};

        files.forEach(function (fileName) {
            var index = "files[" + fileName + "]";
            filesInformation[index] = fs.createReadStream(fileName);
        });

        return postApiCallWithFormData('project/' + projectName + '/add-file', extend(filesInformation, params), callback);
    }
function ( projectName , files , params , callback ) { if ( callback === undefined ) { callback = params ; params = { } ; } var filesInformation = { } ; files . forEach ( function ( fileName ) { var index = "files[" + fileName + "]" ; filesInformation [ index ] = fs . createReadStream ( fileName ) ; } ) ; return postApiCallWithFormData ( 'project/' + projectName + '/add-file' , extend ( filesInformation , params ) , callback ) ; }
Add new file to Crowdin project
@param projectName {String} Should contain the project identifier
@param files {Array} Files array that should be added to Crowdin project.
Array keys should contain file names with path in Crowdin project.
Note! 20 files max are allowed to upload per one time file transfer.
@param params {Object} Information about uploaded files.
@param callback {Function} Callback to call on function completition.
Add new file to Crowdin project