added os detection for file upload