Http Request Node - Parameters with the same name

Describe the problem/error/question

Hi!
I am using an Http Request Node to create a “File Push” with Password Pusher, and to upload multiple files you need to repeat the parameter “file_push[files][]” (Here are the API docs). When I do that, it only uses the last one. Is there a way to repeat the same parameter or another work around for this?

What is the error message (if any)?

Please share your workflow

{
“parameters”: {
“method”: “POST”,
“url”: “https://pwpush.com/f.json”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpCustomAuth”,
“sendBody”: true,
“contentType”: “multipart-form-data”,
“bodyParameters”: {
“parameters”: [
{
“parameterType”: “formBinaryData”,
“name”: “file_push[files][]”,
“inputDataFieldName”: “data_0”
},
{
“parameterType”: “formBinaryData”,
“name”: “file_push[files][]”,
“inputDataFieldName”: “data_1”
}
]
},
“options”: {}
},
“id”: “5cc619aa-92b8-426d-b851-8ed7e34d10ee”,
“name”: “Create SecureShare”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.1,
“position”: [
1520,
540
],
“alwaysOutputData”: true,
“credentials”: {
“httpCustomAuth”: {
“id”: “R72RDTQrgf4V8ebC”,
“name”: “PWPush (SecureShare)”
}
}
},



Hi @ekadin, welcome to the community!

I am sorry you’re having trouble. Unfortunately, I can’t think of a way to make this work in a single request using the HTTP Request node, but perhaps you want to simply split up your files and send multiple requests (one for each file) to your API? Like so for example:

Thank you @MutedJam for your response!
My files are already split, I am actually combining them in a previous Code node. If I split them, it creates a separate file sharing link for each file, which I am trying to avoid. My other option would be to zip the files first and send that to the API.

What is the source of the limitation? If I knew, I could perhaps think of a workaround for my use case.

Thanks again for your help and for N8N, I’m just getting my feet wet, but loving it so far!

1 Like

What is the source of the limitation? If I knew, I could perhaps think of a workaround for my use case.

Hi @ekadin, I think the reason here is that such a logic simply hasn’t been implemented yet (and the body parameter names are acting as keys).

I can’t think of a good workaround beyond writing custom code for this unfortunately, so for the time being I’ll convert this question into a feature request allowing you and other users to vote on adding support for re-using binary parameters names to the HTTP Request node.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.