How to attach a file to the current page with a plugin