Let User upload an avatar image, without exposing /upload route

System Information
  • Strapi Version: 3.6
  • Operating System: Windows 10
  • Database: sqlite3
  • Node Version: v12.2.0
  • NPM Version: 7.8.0
  • Yarn Version: 1.22.4

Hey guys I hope I’ve got the formatting and the category right :slight_smile:

I was wondering, in our Application we want the user to be able to upload an image linked to his account. I was thinking about creating an media type in the Users Collection Type.
The problem with that is that I dont want the User to be able to access the /upload route.

Right know I’ve created a text field called avatarImageBase64 where the user can call a custom route /users/updateProfilePicture and pass a base64 string.

The only problem with that was, that with a base64 String in a text component Strapi cannot load that user in the Admin UI.

Thank you all in advance.
I hope I made everything clear.
Stay safe and have a nice day :slight_smile: