User Profile
Sripal2022
Copper Contributor
Joined 3 years ago
User Widgets
Recent Discussions
406 while downloading large size docx files in PDF format from sharepoint using GraphAPI with PHP
For smaller size files it is working fine but not for large size files (may be more than 4 MB) , We have tried this through Postman and getting below error ... which shows input file is too large. I am not sure if we have any limit on the file size or how to solve it - Any help is greatly appriciated. We have already added setTimeout() with the request but no luck ------------------------------------- { "error": { "code": "notSupported", "message": "Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=UnsupportedMediaType cert=subject:;thumbprint: ResponseHeaders=X-ErrorCode: WordInputFileSizeTooLargeForTimeoutInterval\r\nX-ClientCorrelationId: ccca70ee-6d79-45fc-b25d-d9acb9077da1\r\nX-ServiceCorrelationId: ccca70ee-6d79-45fc-b25d-d9acb9077da1\r\nX-ErrorCategory: NotSupported\r\nX-IsRetriable: False\r\nX-ConversionTimeInMs: 28058.7007\r\nX-FileDownloadTimeInMs: 649.7341\r\nCache-Control: private\r\nDate: Wed, 16 Mar 2022 12:57:34 GMT\r\nServer: Microsoft-IIS/10.0\r\nX-AspNet-Version: 4.0.30319\r\nX-Powered-By: ASP.NET\r\n", "innererror": { "code": "cannotOpenFile" } } } Request format details: Microsoft\Graph\Http\GraphRequest (13) ( protected 'accessToken' -> string (1570) "tokennnnnnnnnnnnn" protected 'apiVersion' -> string (4) "v1.0" protected 'baseUrl' -> string (28) "https://graph.microsoft.com/" protected 'endpoint' -> string (134) "/drives/driveee/items/itemiddd/content?format=pdf" protected 'headers' -> array (4) [ 'Host' => string (28) "https://graph.microsoft.com/" 'Content-Type' => string (16) "application/json" 'SdkVersion' => string (16) "Graph-php-1.55.0" 'Authorization' => string (1577) "Bearer ....." ] protected 'http_errors' -> boolean true protected 'proxyPort' -> null protected 'proxyVerifySSL' -> null protected 'requestBody' -> null protected 'requestType' -> string (3) "GET" protected 'returnsStream' -> null protected 'returnType' -> null protected 'timeout' -> string (6) "1000" ) Response from sharepoint : ----- HTTP/1.1 406 Not Acceptable Cache-Control: private Content-Length: 738 Content-Type: application/json; charset=utf-8 X-AspNetMvc-Version: 5.2 Access-Control-Expose-Headers: x-cache, x-msedge-ref, x-azure-ref-originshield Server-Timing: Provider;dur=0,SharePoint;dur=57,StreamRead;dur=0,TotalRequest;dur=29900,Sandbox;dur=0 Request-Stat: Cached;False,RemoteReads;1 X-CorrelationId: f8f71b40-7752-42f0-b31c-0e3d684ff609.53af1cc2-0194-42e3-a733-57afe9d48d49 X-OneDriveMeTA-Version: 0.0.0.0 X-OneDriveMeTA-Build: Media_PROD_14299847_020422.1_02-04-2022 X-ErrorCode: OfficeConversion_ContentNotSupported X-ErrorType: Expected X-ErrorSource: Content X-AspNet-Version: 4.0.30319 X-Cache: CONFIG_NOCACHE X-MSEdge-Ref: Ref A: 916B1515F1FD4AA08329A3BD644C6AEE Ref B: MAA01EDGE0708 Ref C: 2022-03-16T14:07:40Z Date: Wed, 16 Mar 2022 14:08:10 GMT1.6KViews0likes0Comments
Groups
Recent Blog Articles
No content to show