io.netty.handler.codec.http.multipart.HttpPostRequestEncoder$ErrorDataEncoderException:java.io.FileNotFoundException

io.netty.handler.codec.http.multipart.HttpPostRequestEncoder$ErrorDataEncoderException: java.io.FileNotFoundException

提问人:Dhamotharan R 提问时间:11/17/2023 最后编辑:Dhamotharan R 更新时间:11/17/2023 访问量:36

问:

你能帮我解决这个问题吗(我遇到错误):

 Data:
    {
     "file":"bird.jpeg"
      }

    My Graphql query:
    mutation UpdateProfilePicture ($file: Upload!) {
        singleUpload(file: $file){
        done
    }
   }

功能文件:

Feature: get parent players

    Background:
    * url baseUrl
    Scenario: get parent players details

    * def result = call read(loginPath)
    * def accessToken = result.accessToken
    * print "Access Token : ", accessToken
    And header Authorization = 'Bearer ' + accessToken

    Given def query = read(gqlBase +'updateProfilePicture.gql')
    And request { query: '#(query)'}
    * multipart file file = {read:'bird.jpeg', filename:'bird.jpeg',Content-type:'image/jpeg'}
    When method post
    Then status 200
    * print 'response: ', response.data

当我尝试上传图片时,出现以下错误:

io.netty.handler.codec.http.multipart.HttpPostRequestEncoder$ErrorDataEncoderException:java.io.FileNotFoundException]

测试 空手道

评论

0赞 Peter Thomas 11/18/2023
我想知道在graphql方面,您是否需要为二进制/多部分做一些不同的事情。如果你能找到一个公开的例子,那将会有所帮助。或者要求你做一些研究来帮助社区。或提供一种复制方法:github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue
1赞 Dhamotharan R 11/23/2023
感谢您@Peter托马斯的帮助

答: 暂无答案