Services can support returning of attachments. MockMotor allows you to add attachments to responses with a straightforward and scriptable configuration.

Each mock environment can have multiple attachments. Their names uniquely identify the files.

When you clone an environment, its attachments are cloned too.

Adding Attachments to Environment

One the Attachments tab click Add Attachments button and select the files to upload:

Once you confirm your choice, all the selected files are uploaded:

Editing Attachment Properties

You can change the attachment name and its default content-type.

Note that the responses find the attachments by name, so if you rename an attachment used in a response, you have to update that response code, too.

Click on the attachment name in the list, update the name or content type and click Save:

Delete Attachment

You can delete an attachment from the same editing page. This operation cannot be undone (except by re-uploading, duh!).

Using in Responses

Learn how to add attachments to your responses.