Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hi,i'm trying to create an Image using the MediaService.CreateMedia.however, because umbracoFile is of datatype Image Cropper i can't pass in the stream.. i some how need to create the object that stores the image cropper info.
how can i do this?Is there a way to create an image cropper object? or do i manually have to create the json?how do i add the media file to get the image url?is there a way to return a node ID of the created media?
var mediaImage = Services.MediaService.CreateMedia(model.Image.FileName, 3884, MediaTypes.Image);
mediaImage.SetValue("umbracoFile", model.Image.InputStream); // this fails because it's expecting string,string
Wonders the same thing. Did you found an answer to it?
Update: I've converted the whole thing to JSON myself in backend and it works perfectly. The only problem seems to be able to get the newly saved image path to store in the image cropper JSON-object.
TO BE CONTINUED
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted