POST http://localhost:1337/api/upload 500 (Internal Server Error)

Hello guys.
I need your help.
When I try to use upload functilonality on my strapi, i got a:

POST http://localhost:1337/api/upload 500 (Internal Server Error)

The problem is that an uploaded file appears in the media storage, but it is not attached to the desired ID, and accordingly I also get the above error. In the terminal of the strapi itself, I have the following error: “error: Cannot read properties of undefined (reading ‘attributes’)”.
Schema.json: { "kind": "collectionType", "collectionName": "up_users", "info": { "name": "user", "description": "", "singularName": "user", "pluralName": "users", "displayName": "User" }, "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": { "type": "relation", "relation": "manyToOne", "target": "plugin::users-permissions.role", "inversedBy": "users", "configurable": false }, "events_2412s": { "type": "relation", "relation": "oneToMany", "target": "api::events2412.events2412", "mappedBy": "users_permissions_user" } } }
My request code is: `const formData = new FormData()
formData.append(“files”, image)
formData.append(“ref”, “events2412”)
formData.append(“refId”, evtId)
formData.append(“field”, “image”)

console.log(formData)
const res = await fetch(`${API_URL}/api/upload`, {
    method: "POST",

    body: formData,
})

`
.
Thanks