I ran into an issue uploading file (png/jpg) with projectId, AppID and assets= [{"label": "image"}].
I do not need to use token.
Here is what I used to write script:
Feature: Upload a Asset
Scenario: upload file
Given url "http://localhost:3004/api/design/assets/upload"
And multipart file files = { read: 'classpath:com/Repository/helpers/garden.jpg' }
And multipart field projectId = "someprojectId"
And multipart field appId = '5f7b2d87-e12b-4f17-9c30-a476132b9efc'
And multipart field assets = '[{"label":"garden.jpg"}]'
When method post
Then status 200
And the response I am getting is:
>>> failed features:
status code was: 500, expected: 200, response time in milliseconds: 134, url: http://localhost:3004/api/design/assets/upload, response:
{"error":{"message":"projectId cannot be empty!","extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}}
When I run this in UI or in postman, the rest call is going through. I verified for port is working for end point.
Is this a bug not accepting the projectId and appId as multipart fields? Even after adding the projectId why is it still looking for projectId?