Added repo option to restrict file extensions. Closes #664
Fixed: Uploading an attachment in frontend would not keep the modal layout