Copied to clipboard

Flag this post as spam?

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


  • Avraham Kahana 22 posts 56 karma points
    Apr 26, 2015 @ 15:42
    Avraham Kahana
    0

    IMediaService.CreateMedia throwing "No MediaType matching the passed in Alias: 'Image' was found"

    I found another thread that raises the same issue, but it remained unanswered. I am hoping that a new thread will catch a solver's attention.

    I am receiving http requests from mobile devices with files attached. In trying to create those files under umbraco media (image files), with

    IMediaService.CreateMedia(...)
    

    it throws the following exception: "No MediaType matching the passed in Alias: 'Image' was found".

    What could possibly be wrong (the media type does exist there, and the alias is correct one (case-sensitivity checked...))?

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 26, 2015 @ 21:52
    Alex Skrypnyk
    100

    Hi Avraham,

    Can you show your code ?

    We are creating media like that :

    var media = ApplicationContext.Current.Services.MediaService.CreateMedia(fileName, playersPhotoMediaFolder.Id, Constants.Conventions.MediaTypes.Image);

    Thanks

  • Avraham Kahana 22 posts 56 karma points
    Apr 27, 2015 @ 09:49
    Avraham Kahana
    0

    Hey Alex, thanks for replying, I deleted this post minutes after posting it, having found my (silly) problem. I don't know why it is not yet deleted, and moreover, why I see no option for deleting it now.

Please Sign in or register to post replies

Write your reply to:

Draft