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 reactions find the attachments by name, so if you rename an attachment used in a reaction, you have to update that reaction script, 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 Reactions

Learn how to add attachments to your reactions.