getFileNameFromDispositionHeader = function (dispositionHeader) {
        if (!dispositionHeader) {
            return;
        }

        var encodedFileName,
            fileName;

        // Get filename* value from the dispositionHeader
        encodedFileName = regexes.encodedFileNameRegex.exec(dispositionHeader);

        if (encodedFileName) {
            fileName = decodeFileName(encodedFileName[2], encodedFileName[1]);
        }

        // If filename* is not present or unparseable, then we are checking for filename in header
        if (!fileName) {
            fileName = regexes.fileNameRegex.exec(dispositionHeader);
            fileName && (fileName = fileName[1]);

            // check if file name is wrapped in double quotes
            // file name can contain escaped characters if wrapped in quotes
            if (fileName && fileName[0] === DOUBLE_QUOTES) {
                // remove quotes and escapes
                fileName = fileName
                    .substr(1, fileName.length - 2)
                    .replace(regexes.quotedPairRegex, TOKEN_$1);
            }
        }

        return fileName;
    }
Parses Content disposition header, and returns file name and extension

@private
@param {?String} dispositionHeader - Content-disposition Header from the response
@returns {?String} - Returns file name from content disposition header if present