mergePdfs method
Implementation
Future<Media> mergePdfs(List<File> pdfs, {String? folder}) async {
final response = await _makeRequest(
'POST',
'merge',
files: pdfs
.asMap()
.entries
.map((e) => MultipartFile(
'files',
e.value.openRead(),
e.value.lengthSync(),
filename: "file-${e.key}",
contentType: MediaType.parse(
lookupMimeType(e.value.path) ?? 'application/octet-stream'),
))
.toList(),
formFields: folder != null ? {'folder': folder} : null,
);
return Media.fromJson(response["data"]);
}