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
I've created a custom media type with a text box (alias: videoId and a media picker (alias: thumbnail).
When I use the
dialogService.mediaPicker({ callback: getInfo });
the only relevant properties I get back are
"properties": [ { "id": 3832, "value": "167932-3433787", "alias": "videoId", "editor": "Umbraco.Textbox" }, { "id": 3833, "value": "umb://media/fef2d563f8f5488fba3e1689c03b7197", "alias": "thumbnail", "editor": "Umbraco.MediaPicker2" } ]
My question is, how do I get the actual media back from the MediaPicker2 value (in this case umb://media/fef2d563f8f5488fba3e1689c03b7197)?
SOLVED:
The documentation states in umbraco.resources.mediaResource.getById requires an int. It does not. Passing the umb://media/fef2d563f8f5488fba3e1689c03b7197 works.
http://umbraco.github.io/Belle/#/api/umbraco.resources.mediaResource
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Returning media from mediaPicker and custom media type
I've created a custom media type with a text box (alias: videoId and a media picker (alias: thumbnail).
When I use the
the only relevant properties I get back are
My question is, how do I get the actual media back from the MediaPicker2 value (in this case umb://media/fef2d563f8f5488fba3e1689c03b7197)?
SOLVED:
The documentation states in umbraco.resources.mediaResource.getById requires an int. It does not. Passing the umb://media/fef2d563f8f5488fba3e1689c03b7197 works.
http://umbraco.github.io/Belle/#/api/umbraco.resources.mediaResource
is working on a reply...