Skip to content

Commit b4dc871

Browse files
committed
Supported multiple file extension download.
1 parent 8632c00 commit b4dc871

File tree

2 files changed

+61
-8
lines changed

2 files changed

+61
-8
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# ZOHO CRM PHP SDK
22

3+
## Table Of Contents
4+
5+
* [Overview](#overview)
6+
* [Registering a Zoho Client](#registering-a-zoho-client)
7+
* [Environmental Setup](#environmental-setup)
8+
* [Including the SDK in your project](#including-the-sdk-in-your-project)
9+
* [Persistence](#token-persistence)
10+
* [DataBase Persistence](#database-persistence)
11+
* [File Persistence](#file-persistence)
12+
* [Custom Persistence](#custom-persistence)
13+
* [Configuration](#configuration)
14+
* [Initialization](#initializing-the-application)
15+
* [Class Hierarchy](#class-hierarchy)
16+
* [Responses And Exceptions](#responses-and-exceptions)
17+
* [Multi-User support in the PHP SDK](#multi-user-support-in-the-php-sdk)
18+
* [Sample Code](#sdk-sample-code)
19+
320
## Overview
421

522
Zoho CRM PHP SDK offers a way to create client PHP applications that can be integrated with Zoho CRM.
@@ -82,11 +99,12 @@ Token persistence refers to storing and utilizing the authentication tokens that
8299

83100
### Table of Contents
84101

85-
- DataBase Persistence
102+
- [DataBase Persistence](#database-persistence)
103+
104+
- [File Persistence](#file-persistence)
86105

87-
- File Persistence
106+
- [Custom Persistence](#custom-persistence)
88107

89-
- Custom Persistence
90108

91109
### Implementing OAuth Persistence
92110

src/com/zoho/crm/api/util/CommonAPIHandler.php

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,25 +393,60 @@ private function isExpectedType(Model $model, string $className)
393393
*/
394394
public function getConverterClassInstance($encodeType)
395395
{
396-
switch ($encodeType)
396+
switch ($encodeType)
397397
{
398398
case "application/json":
399399
case "text/plain":
400+
case "application/ld+json":
400401
return new JSONConverter($this);
401402
case "application/xml":
402403
case "text/xml":
403404
return new XMLConverter($this);
404405
case "multipart/form-data":
405406
return new FormDataConverter($this);
406-
case "application/x-download":
407407
case "image/png":
408408
case "image/jpeg":
409-
case "application/zip":
410409
case "image/gif":
411-
case "text/csv":
412410
case "image/tiff":
413-
case "application/octet-stream":
411+
case "image/svg+xml":
412+
case "image/bmp":
413+
case "image/webp":
414+
case "text/csv":
414415
case "text/html":
416+
case "text/css":
417+
case "text/javascript":
418+
case "text/calendar":
419+
case "application/x-download":
420+
case "application/zip":
421+
case "application/pdf":
422+
case "application/java-archive":
423+
case "application/javascript":
424+
case "application/octet-stream":
425+
case "application/xhtml+xml":
426+
case "application/x-bzip":
427+
case "application/msword":
428+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
429+
case "application/gzip":
430+
case "application/x-httpd-php":
431+
case "application/vnd.ms-powerpoint":
432+
case "application/vnd.rar":
433+
case "application/x-sh":
434+
case "application/x-tar":
435+
case "application/vnd.ms-excel":
436+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
437+
case "application/x-7z-compressed":
438+
case "audio/mpeg":
439+
case "audio/x-ms-wma":
440+
case "audio/vnd.rn-realaudio":
441+
case "audio/x-wav":
442+
case "audio/3gpp":
443+
case "audio/3gpp2":
444+
case "video/mpeg":
445+
case "video/mp4":
446+
case "video/webm":
447+
case "video/3gpp":
448+
case "video/3gpp2":
449+
case "font/ttf":
415450
return new Downloader($this);
416451
}
417452

0 commit comments

Comments
 (0)