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 have created a Video mediatype. This type has 2 FileUploads, one for the video and one for the thumbnail. The video FileUpload control has alias "umbracoFile".
Now, when I create a link to the mediaitem from a page, it creates a link to the thumbnail, not the video. I thought it would use the umbracoFile control as the main control.
How can I get Umbraco to use the correct FileUpload control to create the link?
Hope somebody can help.
Can you show the code that renders the link?
thx for your reply. But there's no code involved. It's just plain Umbraco with 2 file controls in one MediaType.
Hope to hear from you again.
But there must be some code rendering out the poster image and the video in a view somewhere? :-)
But I'm wondering if perhaps you can post 2 screendumps just to make your context much more clear to us. It would be nice to see a screendump of the Video media type that you mention and also from the content section where you select the video type.
When selecting the media item using a media picker you should be able to access both fields in your code and it's most likely in your view that something is not quite right as Alex hinted at in his initial post too.
Looking forward to hearing from you.
thanks for your quick response.
I understand and therefore I'll post some screenshots with the workflow.
Here is a screendump of hte Video MediaType:
So in the RTE I just create a link to the MediaType:
First select a text or image, create a link and "select Media":
Then simply select the Video to link to:
After I finisched, Umbraco created a link to the image in de Media, not to the Video. Although the video is the original umbracoFile property.
I also tried reordering the properties with the videofile on the top. But that didn't work either.
For now I have a workaround with a Macro.
Ok I see now - I did not think that you referenced it in a rich text editor (sorry if I missed that). But in order for you being able to reference the video and not the poster I'll suggest you try to move the selection of vidoes outside the rich text editor, which is not the ideal place to deal with this imho.
I'm thinking that you could perhaps add a media picker below the rich text editor field, which is setup to allow multiple media where you can then select either videos or images.
Then in your template you can check if any medias have been selected and then loop over them and render the link to the video and use the poster as the clickable image for instance.
Does this make sense?
I understand your suggestion and agree it would be the better solution.
But my client wants to place in text references to video's and I just don't understand why this wouldn't work like this.
How does Umbraco select the file to link to?
Sorry for my late reply - It's been a busy few weeks planning an UmbracoBBQ and my upcoming wedding :)
Well the rich text editor is a 3rd party library, which has been integrated into Umbraco and that does not take custom media types into account. In order to make that happen I think you should probably write your own plugin for TinyMCE, which is the editor Umbraco is using for the RTE datatype. But I'm not sure how one can do that.
But it won't work out of the box with custom media types and fields. And I'm not quite sure how Umbraco manages to select the poster image in your scenario though.
But if possible I will still suggest that you discuss other options with your client.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted