Comments (6)
hey, I'll have a look. What would be the expected key?
{
"files[0]": "report.html file",
"files[1]":" report.json file"
}
something like this?
from http-request-action.
Thanks for a quick reply, so the correct data for my CMS patch is:
Looks like it just doubles the same key without array index for the form data.
from http-request-action.
Could you please test if its working with fjogeleit/http-request-action@support-file-array
?
I added a basic test action, so it looks good but would like your confirmation before I release it.
from http-request-action.
Sure, so my step looks like this:
- name: Upload Report
uses: fjogeleit/http-request-action@support-file-array
with:
url: [Endpoint URL]
method: POST
contentType: multipart/form-data
bearerToken: ${{ secrets.API_ADMIN_SECRET_KEY }}
customHeaders: '{"Content-Type": "application/json"}'
data: '{"jobId": "${{ github.event.inputs.jobId }}"}'
files: '{"attachments": [".lighthouseci/report.html", ".lighthouseci/report.json"]}'
And when executed, I get a mimetype error:
{"code":400,"message":{"code":400,"message":"Something went wrong while processing your request.","data":{"attachments":{"code":"validation_invalid_mime_type","message":"\"report_vETdVgmY8E.html\" mime type must be one of: text/html, application/pdf, image/png, image/jpeg, application/json."}}}}
However, as you can see in the error message, text/html
is allowed.
from http-request-action.
okay, thanks. I will check it.
from http-request-action.
sorry for the late response, can you find out what contentType the files have in your case? I tried different things and in the debug logs the content types look correct, so I am wondering what your backend receives as content type.
from http-request-action.
Related Issues (20)
- v1 is not pointing to the latest v1.x.x version HOT 3
- File Uploads with `\` in the path are broken HOT 20
- Feature Request: store response into a file HOT 3
- How to install the CLI tool? HOT 1
- Getting error: "Unable to convert Data and Files into FormData: source.on is not a function" HOT 1
- Retries? HOT 3
- Headers and Content-Type errors HOT 3
- Method delete is causing AxiosError HOT 11
- Enable mutual TLS https authentication HOT 3
- Feature Request: Mask responses HOT 7
- Outputting a response via `responseFile` results in an exception when the response is empty. HOT 3
- Conditional use of JSON.stringify on response.data causing issues parsing the response HOT 4
- Pass data through json file HOT 2
- Upgrade to Node 20 HOT 1
- Update v1 tag to latest (1.15.2) HOT 12
- Access to Response Body for Ignored Status Codes HOT 2
- 'No response received' is logged when server returns just a status code HOT 1
- The retry functionality is wrong HOT 5
- Any way to retrieve the response status code?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-request-action.