How to send a buffer in form-data to SignServer?

房东的猫 提交于 2019-12-04 11:17:13

You explicitly need to set a filename for the data field, otherwise the buffer isn't uploaded as a file:

form.append('data', file_buffer, { filename : 'document.pdf' });

This is documented (albeit not very clearly) here: https://github.com/form-data/form-data#alternative-submission-methods (scroll down to the fourth example).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!