November Happy Hour will be moved to Thursday December 5th.

MediaType required properties

Vote:
 

Hi folks!

Usually when you create content with properties marked with the required attribute, the user is prompted to fill in the values before moving on. How can I achieve the same when uploading media? We have an ImageFile mediatype but it does'nt help to put on the required attribute and you can publish the media without prompting for values. All suggestions are much appreciated.

/K

#194485
Edited, Jun 22, 2018 10:02
Vote:
 

Hey, K,

What you can do is validate the page where the Media is being used, so then you display an error message on the page instead the media data (using IValidate or IContentSaveValidate).

But does it really get published, even if a required field isn't filled in? When I do this on AlloyTech templates, the media is not actually published, although it gives a success message (if you try to edit it, there is a publish button and using it on pages gives clear indication it's not published).

I do agree that editor experience is not the best in this case. At least the message "Uploaded" could be change to "Uploaded, but not published. Go to file to publish it." or similar.

BR,
Marija

#194524
Jun 24, 2018 11:39
Vote:
 

Hi Marija.

Thanx for your answer. Seems you're right, the media is not not published. Solved it (temporary) as you mentioned, with validation on page publish.  

/Kai

#194933
Jul 09, 2018 15:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.