In the uHangout episode you showed a way to transfer media items from an 'old' site to a 'new' site. If I understood correctly, it is done with a webapi. I could really use this for a site I'm working on.
You are right Vincent, we are using a webapi to do that, but you can also do the same thing through base.
In your "old" instance, create a webapi with this method:
[RestExtension("Helper")]
public class Helper
{
[RestExtensionMethod(returnXml=false)]
public static string MediaPathById(string id) {
return new Media(int.Parse(id)).getProperty("umbracoFile").Value.ToString();
}
}
In the "New" Instance, in your proxy method, replace each media fields in the legacy umbraco.config by the path to the file "c:/../../yourfile" (depend on your structure, you will have to download it first). Take an account that uMirror when the property is an mediaPicker expect a path to a file.
Please share the code for transfering images
Hi,
In the uHangout episode you showed a way to transfer media items from an 'old' site to a 'new' site. If I understood correctly, it is done with a webapi. I could really use this for a site I'm working on.
Thanks.
You are right Vincent, we are using a webapi to do that, but you can also do the same thing through base.
In your "old" instance, create a webapi with this method:
In the "New" Instance, in your proxy method, replace each media fields in the legacy umbraco.config by the path to the file "c:/../../yourfile" (depend on your structure, you will have to download it first). Take an account that uMirror when the property is an mediaPicker expect a path to a file.
Let me know If you have any other question
is working on a reply...