I'm struggling to edit a custom mediaType's property ("umbracoFile").
The property is an image cropper.
I've tried this snippet with no luck:
mediaItem.SetValue("umbracoFile", "/media/1059/uploader-test.jpg");
Plz take notice that I'm NOT creating a new Image - but trying to update an allready existing one... - who kan tell med how to acess this property...? :-|
Update 'umbracoFile' property on existing Media
I'm struggling to edit a custom mediaType's property ("umbracoFile"). The property is an image cropper. I've tried this snippet with no luck: mediaItem.SetValue("umbracoFile", "/media/1059/uploader-test.jpg");
Plz take notice that I'm NOT creating a new Image - but trying to update an allready existing one... - who kan tell med how to acess this property...? :-|
You need the MediaService to save the item:
Yup - that did the trick... - how could I miss that... ;-)
Hm - since upgrade to ver. 7.3.0/7.3.1 it seems like the mediaService is not acting correctly... :-|
@Robin If you can show more of your code (preferably in text, not in a screenshot) we can help you better.
Absolutly - this is a little script I'm experimenting with, a custom mediaType to take screenshots with - worked like a charm in ver. 7.2.8:
Hmmm.. from the code I can only conclude that
mediaItem
is actually null, have you checked that?is working on a reply...