PhantomJS - Upload a file without submitting a form

后端 未结 2 1347
眼角桃花
眼角桃花 2020-12-30 11:58

Is it possible to upload a file to a certain page using PhantomJS without submitting manually the form? I think something is possible using the Content-Type: multipart/form-

2条回答
  •  臣服心动
    2020-12-30 12:33

    The solution I've used at the end is a mix of NodeJS and PhantomJS, in case I need to upload something I fork a process and upload the file(s) using the NodeJS "request" module and then send back to PhantomJS the output of the page, which need to be manually processed.

提交回复
热议问题