Title: File parameters not interpreted as files · Issue #60 · ConvertAPI/convertapi-library-node · GitHub
Open Graph Title: File parameters not interpreted as files · Issue #60 · ConvertAPI/convertapi-library-node
X Title: File parameters not interpreted as files · Issue #60 · ConvertAPI/convertapi-library-node
Description: There is a bug in the library when passing multiple files to the converter. For example, DOCX to Compare conversion takes two files as parameters: File and CompareFile. The File parameter is interpreted as a file and sent to CARA as a fi...
Open Graph Description: There is a bug in the library when passing multiple files to the converter. For example, DOCX to Compare conversion takes two files as parameters: File and CompareFile. The File parameter is interp...
X Description: There is a bug in the library when passing multiple files to the converter. For example, DOCX to Compare conversion takes two files as parameters: File and CompareFile. The File parameter is interp...
Opengraph URL: https://github.com/ConvertAPI/convertapi-library-node/issues/60
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"File parameters not interpreted as files ","articleBody":"There is a bug in the library when passing multiple files to the converter. For example, DOCX to Compare conversion takes two files as parameters: ```File``` and ```CompareFile```. The ```File``` parameter is interpreted as a file and sent to CARA as a file object. My guess is that the ```CompareFile``` is sent as a plain string (path to file) rather than the file itself. Conversion results in the following error:\r\n\r\n```js\r\n data: {\r\n Code: 5008,\r\n Message: 'Unable to access the file. Call failed with status code 500 (Internal Server Error). Remote file C:/Projects/stuff/Test projects/ConvertAPI NodeJs/file-2.docx'\r\n }\r\n```\r\n\r\nCode snippet to replicate the issue:\r\n\r\n```js\r\nconst convertapi = require('convertapi')(secret);\r\nconvertapi.convert('compare', {\r\n\tFile: '/path/to/file-1.docx',\r\n\tCompareFile: '/path/to/file-2.docx',\r\n\t}, 'docx').then(function(res) {\r\n\t\tconsole.log(res);\r\n})\r\n```\r\n\r\nPlease note that there might be more conversions that accept multiple files as parameters, for example PDF watermark overlay (https://www.convertapi.com/pdf-to-watermark-overlay), so hardcoding the logic based on property name is not a good idea.\r\n","author":{"url":"https://github.com/kostas-jonauskas","@type":"Person","name":"kostas-jonauskas"},"datePublished":"2023-03-21T09:15:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/60/convertapi-library-node/issues/60"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e9ad1241-ef4a-f323-e589-95b824fb1f96 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95DC:2E8DD4:29B43A:3807F6:697CEC2D |
| html-safe-nonce | f39a916adf4054625e9a8c460ce975dc0fa36a5cb4194de4e0fba70fa41d66e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NURDOjJFOERENDoyOUI0M0E6MzgwN0Y2OjY5N0NFQzJEIiwidmlzaXRvcl9pZCI6IjQ1NzU5ODU4NzQwNzU3MDg0NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5b9e7676038ba39bee9cee8c2bbe0b47fd50185a2d690d0429afb820efc4dbda |
| hovercard-subject-tag | issue:1633496962 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ConvertAPI/convertapi-library-node/60/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bf4fa08701837348926cc5b1fe9a6c33a9a44fe43f12356cc015d514105d50d7/ConvertAPI/convertapi-library-node/issues/60 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bf4fa08701837348926cc5b1fe9a6c33a9a44fe43f12356cc015d514105d50d7/ConvertAPI/convertapi-library-node/issues/60 |
| og:image:alt | There is a bug in the library when passing multiple files to the converter. For example, DOCX to Compare conversion takes two files as parameters: File and CompareFile. The File parameter is interp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kostas-jonauskas |
| hostname | github.com |
| expected-hostname | github.com |
| None | debf35e05f408e95650aacfde47554809b144e6456e89039cbec3c26cd1fc93c |
| turbo-cache-control | no-preview |
| go-import | github.com/ConvertAPI/convertapi-library-node git https://github.com/ConvertAPI/convertapi-library-node.git |
| octolytics-dimension-user_id | 37071453 |
| octolytics-dimension-user_login | ConvertAPI |
| octolytics-dimension-repository_id | 140835661 |
| octolytics-dimension-repository_nwo | ConvertAPI/convertapi-library-node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 140835661 |
| octolytics-dimension-repository_network_root_nwo | ConvertAPI/convertapi-library-node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | efd4ca6943fce67a11235cf3699b1d8ffbf4a583 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width