test script for saving media attachments