ved_singhal
8h
Hi Team,
I appreciate any help on this.
I am actually building a GPT action and trying to call my external API and need to post a .zip file to my API.
This is how I have constructed my GPT schema -
{
"openapi": "3.1.0",
"info": {
"title": "",
"description": "",
"version": "v1.0.0"
},
"servers": [
{
"url": ""
}
],
"paths": {
"/fileUpload": {
"post": {
"description": "*",
"operationId": "UploadFile",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"fileSource": {
"type": "string",
"format": "binary"
},
"name": {
"type": "string"
}
},
"required": ["fileSource", "name"]
}
}
},
"required": true
},
"responses": {
"200": {
"description": "File uploaded successfully"
},
"400": {
"description": "Error in file upload"
}
}
}
}
},
"components": {
"schemas": {}
}
}
Can someone please suggest how can make it work. I have working code built in PowerShell and that has below lines of code and that could be the reason why it is not working but the problem is not sure how to pass these values from GPT action schema -
"Content-Disposition: form-data; name="fileSource"; filename="$projectName.zip"",
"Content-Type: application/x-zip-compressed$LF",