自从Document AI jpeg API的最后一次更新以来,我不能再以nodeJS文件格式发送了。我首先收到了以下消息:
Error: 3 INVALID_ARGUMENT: At this time, the only MIME types supported are 'application/pdf','application/json', 'image/gif' and 'image/tiff'.当我修改代码来处理TIFF图像时,我得到了以下消息:
"(node:15782) UnhandledPromiseRejectionWarning: Error: 3 INVALID_ARGUMENT: Unsupported input file format."
我确定文件是TIFF,我先将它存储在云存储中,内容类型被描述为"image/tiff“
我附上了一些图片以供澄清。


发布于 2020-09-02 05:37:55
我曾经有过类似的问题,你的PDF文件。我上传了pdf文件到谷歌云存储,并打算用这些文件运行document AI NodeJS应用程序接口,但我得到了和你一样的错误。“(节点:15782) UnhandledPromiseRejectionWarning:错误:3 INVALID_ARGUMENT:不支持的输入文件格式。”在我的代码中,应用程序被设置为‘mimeType /pdf’。但是这个问题在mimeType被设置为'PDF‘后被修复了。我想知道这对你有没有一点帮助。
https://stackoverflow.com/questions/63445219
复制相似问题