Add files and folders to the database in details view (see #6880)