How t upload apk via webhook to mobsf(upload api)

I call workflow using curl
curl -v -X POST “http://localhost:5678/webhook-test/upload” -F “[email protected]

Please share your workflow

Share the output returned by the last node

Bad request - please check your parameters
400 - “{"error": {"file": "This field is required."}}”

Information on your n8n setup

  • n8n version: n8n Version 1.121.3

    mobsf Version v4.4.3

  • Running n8n via (Docker):

  • Operating system: both in docker

Hey @tkJ9YttkJ9Yt

You will need to pass the binary and not a simple text.

thanks reply, I chaged but still not working

{
“nodes”: [
{
“parameters”: {
“method”: “POST”,
“url”: “http://172.17.0.3:8000/api/v1/upload”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendBody”: true,
“contentType”: “multipart-form-data”,
“bodyParameters”: {
“parameters”: [
{
“parameterType”: “formBinaryData”,
“name”: “file”,
“inputDataFieldName”: “file”
}
]
},
“options”: {}
},
“id”: “a885be13-54f9-4a5a-8b95-cbe109dfbcda”,
“name”: “Upload to MobSF”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4,
“position”: [
-1920,
112
],
“alwaysOutputData”: false,
“credentials”: {
“httpHeaderAuth”: {
“id”: “zCGlSQ3edPhu8jFt”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “upload”,
“options”: {
“binaryPropertyName”: “file”
}
},
“id”: “ef6ae716-e351-4d93-b7ad-f1120bb40fc0”,
“name”: “Webhook1”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 2.1,
“position”: [
-2144,
112
],
“webhookId”: “1d84537c-002f-409c-878f-87265f4639a6”
}
],
“connections”: {
“Upload to MobSF”: {
“main”: [

]
},
“Webhook1”: {
“main”: [
[
{
“node”: “Upload to MobSF”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “c59f4c9e05910b41ed6d8a43c92a7c3560771f877a5f3a6c63defca37e6835f0”
}
}

1 Like

As I mentioned previously in the image “THE ORANGE TEXT HERE”

3 Likes

thanks bro ! save my life

1 Like

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