The following instructions are to show how to make a
POST call with an entire file included in the data.
- This feature is only available on-premises as of API Fortress version 20.2.0.
- This feature also requires that you update the
remotedownloadagentto the latest version as well.
For multipart, API Fortress will look for files in the
/data directory, so you'll have to mount a volume to the
/data directory. For example, if you're using
docker-compose, it's done like this:
Navigate to the
apifortressby issuing the following command:sudo docker-compose stop apifortress
There is a section labeled “#APIFORTRESS DASHBOARD”, at the bottom of this section there will be a
Here you will see
# - ./data:/datayou can uncomment this line by getting rid of the
This will create a folder called
/core/directory.volumes:- ./tomcat_conf/conf:/usr/local/tomcat/conf# - ./bin:/usr/local/tomcat/bin- ./data:/data
Now start the
apifortressservice again by issuing the following command:sudo docker-compose up -d apifortress
Now that we have a directory mounted we can make the
POST call using a file from the
- You can add a “post parameter” to your
POSTcall to load the file into.
- Give the post parameter a name and craft the value using the following notation:
- If the name matches a file in the
/data/directory, then the whole form becomes a
form-datatype, and the file will be uploaded as a multipart.