I can’t send a file via the HTTP Request node in multipart/form-data mode
I get the data on the web hack and create a csv file from it via the Spreadsheet File node. Next, I need to send this file in the form of a POST request, but I can’t send it in the request body (the api won’t accept the data).
Please tell me how to transfer a file in the form of a POST request?
Below I have attached an example of the correct query:
POST https://api.site.net/management/v1/counter/{counterId}/offline_conversions/upload?client_id_type=CLIENT_ID
Content-Type: multipart/form-data; boundary=------------------------7zDUQOAIAE9hEWoV
Context-Length: 253
--------------------------7zDUQOAIAE9hEWoV
Content-Disposition: form-data; name="file"; filename="data.csv"
Content-Type: text/csv
ClientId,Target,DateTime,Price,Currency
133591247640966458,GOAL1,1481718166,123.45,RUB
133591247640966458,GOAL2,1481718142,678.90,RUB
133591247640966458,GOAL3,1481718066,123.45,RUB
579124169844706072,GOAL3,1481718116,678.90,RUB
148059425477661429,GOAL2,1481718126,123.45,RUB
148059425477661429,GOAL3,1481714026,678.90,RUB
--------------------------7zDUQOAIAE9hEWoV--
Information on your n8n setup
- n8n version: 1.22.6
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Ubuntu 20.04