static bool isFileLink(String url) { if (!isUrl(url)) return false; final mimeType = lookupMimeType(url); return mimeType != null; // If MIME type exists → it's likely a file }