odoo/odoo#151755

Created by Vishal Padhiyar (visp)
label
odoo-dev:16.0-traceback-on-uploading-folder-visp
head
9ee5613857e1df5a807215b13c0901e449bcb85a
target
16.0
merged
1 month ago by SM Engagement, Damien Abeloos (abd)
forward-ports

[FIX] web_editor: show toaster notification error on uploading folder

**Steps to reproduce:**

**OS:** Ubuntu 20.04.4 LTS with nautilus
**Browser:** Google Chrome Version 123.0.6312.58

- type /file command in knowledge
- select a folder and click on open
- traceback occurs

**Current behavior before PR:**

When a user attempts to upload a folder using /file command, the processing begins, but the folder is not uploaded because the `getDataURLFromFile` return promise is not fulfilled. Additionally, there is no indication of any warnings or errors during the folder upload process.

**Desired behavior after PR is merged:**

If a user attempts to upload a folder instead of a file using the /file command, it results in an error message in the toaster notification.

task-3690847