Attach file on selection when JS is enabled
Fix a compiler warning
Delete commented out line