Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
Does anyone know how you get an entity by a UDI in an angular controller?
I'm currently using this, but it only seems to work for the conventional integer Id.
entityResource.getByIds(ids, "Document").then(function (medias) { _.each(medias, function (media, i) { //only show non-trashed items if (media.parentId >= -1) { $scope.images.push(media); $scope.ids.push(media.id); } }); $scope.sync(); });
I need to pass in a list of UDI's to get around a Courier issue.
Thanks
Paul
Hi Paul.
We had the exact same issue. Because Umbraco Cloud creates new id's on media files, when transfered.
So all our custom grid editors, where we use the media picker, took the wrong images.
But we found out that you also can get media by udi's.
var udi1 = "umb://media/8bc1618636a744dda98bc29df4d7ae56"; var udi2 = "umb://media/da98bc29df4d7ae568bc1618636a744d"; entityResource.getByIds([udi1,udi2], "Media").then(function (medias)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to get an entity by UDI in angular controller
Hello,
Does anyone know how you get an entity by a UDI in an angular controller?
I'm currently using this, but it only seems to work for the conventional integer Id.
I need to pass in a list of UDI's to get around a Courier issue.
Thanks
Paul
Hi Paul.
We had the exact same issue. Because Umbraco Cloud creates new id's on media files, when transfered.
So all our custom grid editors, where we use the media picker, took the wrong images.
But we found out that you also can get media by udi's.
is working on a reply...