Skip to content

Alternative "Converter" parameter lowercase #59

@kostas-jonauskas

Description

@kostas-jonauskas

When passing the "Converter" parameter starting with the capital "C" the conversion fails:

image

If we pass "converter" instead of "Converter" then it succeeds. The converter matching should ignore the case.

Here is the code to replicate the bug:

async function start() {
	try {
		let secret = '<your secret here>'
		const convertapi = require('convertapi')(secret);
		let result = convertapi.convert('pdf', {
			File: 'path/to/sample.xlsx',
			PageSize: 'envelopeusa',
			Converter: 'Printer'
			}, 'xlsx').then(function(res) {
				console.log(res);
		});
		console.log(result);
	}
	catch(exception) {
		throw exception;
	}
}

start();

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions