Ubuntu – Why nautilus is not searching in sub directories when I search for uploading a document from chrome

20.04nautilus

The issue is in Ubuntu 20.04.2. I can use nautilus app to search for files without issues. But when I search for same files to upload from a web browser (chrome/firefox), let's say to upload to GMail, it won't search in the sub directories/folders. See screenshots.
What am I missing?

Note: I have already gone through few posts like the below urls. But haven't got any proper answers.

File search not working completely in folders or at all when uploading

When uploading files in Chrome, how do I choose the file browser?

Screenshots:

Searching from nautilus app:
Searching from nautilus app

Searching while trying to upload to gmail
searching while trying to upload to gmail

Best Answer

First, the dialog you see in Chrome is not the file manager Files (nautilus). It is a system dialog to open files. On GTK based desktops such as the one used on standard Ubuntu, this is a GTK3 dialog.

It would be very handy if one could directly search for a file in that dialog the way it currently works in Files. Unfortunately, that is not the case. It currently only searches in the current folder, and does not allow to specify multiple search strings like Files does.

So the reason is that Files and the GTK3 dialogs are different open source projects. They may handle some things a little bit differently. In this case, this indeed leads to a behavior that is not fully consistent.

Related Question