adding a file to segments, using mimetype based views. Including a template for pdf