This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

eric27155
eric27155

I am trying to create a profiles plugin which integrates with another plugin of mine, which manages media. The media plugin has an Image model which has an attachOne relationship for image uploads. I am trying to use the Relation Controller so that my profiles plugin can attach,create,deteach,... images associated to a profile, but then problem is when I create a new Image model with the uploaded image file, the validation part of the image model doesn't seem to think there is an uploaded image present and prevents me from creating the new image model instance. The validation rules on the Image model just has image field as being required along with a title.

But if I attach an Image model that already exists in the DB to a profile and then update the picture from the relation manager it saves it no problem, it's only when creating a new model instance that the validation seems to fail.

So, I was wondering if anyone had any ideas how to solve this problem I am having.

Screenshot: https://imgur.com/a/fOQNm

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.