I have a question about a web service.
In my method I want to create a media item if it does not exist yet. In umbraco v7 I have always used the following code.
var existingFile = mediaService.GetById(mediaId);
Where mediaId was an int.
Now I am working in umbraco v8 and get the input paramter as Udi. Unfortunately there is no function GetByUdi
How can I get the id from the Udi so I can check if the media item already exists? Or is there a way to check with the Udi if the file already exists?
Webservice - getByUdi
Hello all,
I have a question about a web service. In my method I want to create a media item if it does not exist yet. In umbraco v7 I have always used the following code.
Where mediaId was an int.
Now I am working in umbraco v8 and get the input paramter as Udi. Unfortunately there is no function
GetByUdiHow can I get the id from the Udi so I can check if the media item already exists? Or is there a way to check with the Udi if the file already exists?
Thanks
To anyone who might be interested. The
GetByIdactually takes as Parameter the Guid.The following post helped me out: https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/89070-udi-and-contentservice-getvalue#comment-281576
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.