WorldServer 11.3 Customizing the REST API

The following article in the SDL WorldServer 11.3 Developer Documentation provides an explanation on how to customize the REST API:

For the most part the instructions are clear and easy to follow. However, there is one missing piece of information that would have been helpful to include.

One of the steps explains how to upload a .jar file containing custom REST API code. The step says the following:

"Upload the .jar file into WorldServer. Use any REST client you want. To upload the .jar file, make a POST request to <protocol>://<ws-host>:<ws-port>/ws-api/v1/customizations/api?token=<sessionId>. Use a form-data body."

I attempted to do this, but received the following error response:

    "errors": [
            "message""File with size 0 is too small."

After some trial and error I discovered that even though I was including the .jar file in a form-data body, I was not using the correct key. The upload succeeded when I sent the .jar file with the key name "file".

Hopefully this will be helpful to someone else who runs into the same issue I saw.