Get ImageCropper & File Upload via SurfaceController
Hey everyone!
I'm still new to Umbraco but I've found my way around Surface Controllers.
I have created a SurfaceController which you can see future below. But what I can't figure out is how to grab the URL from an Image Cropper and File Upload, I would normally do something like this: @node.GetCropUrl("uploadImage, "thumbnail");
But that doesn't work inside the controller. How do I achieve this? My end goal is to display the URL in a IMG tag when clicking on a category on this page: http://sp34k.dk/portfolio/vue/ in the description area.
Get ImageCropper & File Upload via SurfaceController
Hey everyone!
I'm still new to Umbraco but I've found my way around Surface Controllers.
I have created a SurfaceController which you can see future below. But what I can't figure out is how to grab the URL from an Image Cropper and File Upload, I would normally do something like this:
@node.GetCropUrl("uploadImage, "thumbnail");
But that doesn't work inside the controller. How do I achieve this? My end goal is to display the URL in a IMG tag when clicking on a category on this page:
http://sp34k.dk/portfolio/vue/
in the description area.CODE:
https://jsfiddle.net/odg3zamx/7/
SOLUTION: I has help from StackOverflow, It's rather simple. All you have to do is:
1) Add using Umbraco.Web; 2) You can now grap GetCropUrl
Example:
Nice job Mike, Thanks for sharing. Will probably be helpful for others! #h5yr!
is working on a reply...