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
media subfolder value -1,37738 cannot convert to int, anyone with a solution?
umbraco V8
Well an integer is always a full number, so you cannot parse '-1,37738' to an int.
I'm not sure what you want to do, but you can always parse to a float if you need it in that format?
Hi @ Ambert
I got the solution, I discovered that i shouldn't be passing -1, I only find out that I need to only pass the id. thanks for your input.
var media = _mediaService.CreateMediaWithIdentity(filename, 37738, mediaType);
this is the correct way of doing it!!!
I want to pass this value to this method to save the file inside a specific subfolder using the subfolder path value.
var media = _mediaService.CreateMediaWithIdentity(filename, -1,37738, mediaType);
parameter takes an integer only
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Media subfolder id unable to convert from string to int
media subfolder value -1,37738 cannot convert to int, anyone with a solution?
umbraco V8
Well an integer is always a full number, so you cannot parse '-1,37738' to an int.
I'm not sure what you want to do, but you can always parse to a float if you need it in that format?
Hi @ Ambert
I got the solution, I discovered that i shouldn't be passing -1, I only find out that I need to only pass the id. thanks for your input.
var media = _mediaService.CreateMediaWithIdentity(filename, 37738, mediaType);
this is the correct way of doing it!!!
I want to pass this value to this method to save the file inside a specific subfolder using the subfolder path value.
var media = _mediaService.CreateMediaWithIdentity(filename, -1,37738, mediaType);
parameter takes an integer only
is working on a reply...