How to allow non-admin users to upload and delete media?

Hello,

I am building a dashboard in which users can upload a photo or video which is then displayed to other users. The path for these photos and videos is /media/dashboard_media/(name).

When I'm logged in on my own user, which is an admin, I am able to upload, view and delete media. However, when I'm logged in as a non-admin user, I am only able to view media.

I have tried adding the following two blocks code (separately) to my configuration.yaml:

homeassistant:
  media_dirs:
    media: /media

homeassistant:
  media_dirs:
    dashboard_media: /media/dashboard_media

Neither has made it possible for a non-admin user to upload or delete media from /media/dashboard_media/*. The logs that appear when attempting to upload a photo or video are:

Login attempt or request with invalid authentication from (IP address). Requested URL: '/api/media_source/local_source/upload...

And if I try to upload it manually via Media > Manage > Upload, I get:

Upload failed: Unknown error

Just for clarification: I do not want any media to be uploaded to /config/www/*.

Is there a way to allow non-admin users to upload and delete in and from a specified directory?

Nope. Only way is to make them admins if you want to give this permission.

Thanks for your reply. That's very unfortunate.

I found a different way in case anyone comes across the same problem:

I used Claude to write a custom addon which creates a special API running on Home Assistant that allows users to upload and delete files from a specified directory. If you're going to do the same, make sure that you either limit the addon's scope to a specified directory (e.g. /media/uploads/*) and/or use a token-based security measure.