Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wietze Strik 27 posts 131 karma points
    Jun 01, 2018 @ 12:06
    Wietze Strik
    0

    Content link to media item with multiple FileUploads

    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.

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 01, 2018 @ 08:46
    Alex Skrypnyk
    0

    Hi Wietze

    Can you show the code that renders the link?

    Thanks,

    Alex

  • Wietze Strik 27 posts 131 karma points
    Aug 09, 2018 @ 06:27
    Wietze Strik
    0

    Hi Alex,

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Aug 09, 2018 @ 07:17
    Jan Skovgaard
    1

    Hi Wietze

    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.

    /Jan

  • Wietze Strik 27 posts 131 karma points
    Aug 09, 2018 @ 08:20
    Wietze Strik
    0

    Hi Jan,

    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: 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": Create a link to Media Then simply select the Video to link to: Select Media item

    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. Link

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Aug 09, 2018 @ 09:10
    Jan Skovgaard
    0

    Hi Wietze

    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?

    Cheers, Jan

  • Wietze Strik 27 posts 131 karma points
    Aug 10, 2018 @ 13:26
    Wietze Strik
    0

    Hi Jan,

    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?

    /Wietze

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Aug 19, 2018 @ 18:18
    Jan Skovgaard
    0

    Hi Wietze

    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.

    /Jan

  • Wietze Strik 27 posts 131 karma points
    Aug 20, 2018 @ 12:23
    Wietze Strik
    1

    Hi Jan,

    thx for your reply! I'll take it into consideration.

    Have fun at the BBQ and a great wedding!

    Best regards, Wietze

Please Sign in or register to post replies

Write your reply to:

Draft