Add photo to user on registration doesn't work , provide password error

System Information
  • Strapi Version: 3.5.3
  • Operating System: Windows 10 64bits
  • Database: PostgreSQL
  • Node Version: v14.16.0n
  • NPM Version: 6.14.11

What i’ve done :
Test user registration with postman : OK ( but minLength for password and username don t seem to work )
Add photo media field to user in admin

  • Here the User.settings.json in extensions/user-permissions/models

{

“kind”: “collectionType”,

“collectionName”: “users-permissions_user”,

“info”: {

"name": "user",

"description": ""

},

“options”: {

"draftAndPublish": false,

"timestamps": true

},

“attributes”: {

"username": {

  "type": "string",

  "minLength": 3,

  "unique": true,

  "configurable": false,

  "required": true

},

"email": {

  "type": "email",

  "minLength": 6,

  "configurable": false,

  "required": true

},

"provider": {

  "type": "string",

  "configurable": false

},

"password": {

  "type": "password",

  "minLength": 6,

  "configurable": false,

  "private": true

},

"resetPasswordToken": {

  "type": "string",

  "configurable": false,

  "private": true

},

"confirmationToken": {

  "type": "string",

  "configurable": false,

  "private": true

},

"confirmed": {

  "type": "boolean",

  "default": false,

  "configurable": false

},

"blocked": {

  "type": "boolean",

  "default": false,

  "configurable": false

},

"role": {

  "model": "role",

  "via": "users",

  "plugin": "users-permissions",

  "configurable": false

},

"photo": {

  "model": "file",

  "via": "related",

  "allowedTypes": [

    "images"

  ],

  "plugin": "upload",

  "required": false

}

}

}

And when i try to send a postman request

I got the error : “Please provide your password.”

Help me please , i’m stuck with it .

1 Like