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
im making profile image upload on my nforum, but im having problems getting the admin user with:User user = new User(0);
i need it to create the new media:User user = new User(0);Media media = Media.MakeNew(CurrentMember.MemberLoginName, MediaType.GetByAlias("image"), user, MediaParentNodeId);
im getting the error: No node exists with id '0'
Does anyone have an idea why?
Have you tried debugging it in Visual studio and make sure its not the GetByAlias thats not causing the problem
aaaaaa sorry Lee, it was my "MediaParentNodeId" that caused the problem...
Have a great day ;-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
getting the umbraco admin user
im making profile image upload on my nforum, but im having problems getting the admin user with:
User user = new User(0);
i need it to create the new media:
User user = new User(0);
Media media = Media.MakeNew(CurrentMember.MemberLoginName, MediaType.GetByAlias("image"), user, MediaParentNodeId);
im getting the error: No node exists with id '0'
Does anyone have an idea why?
Have you tried debugging it in Visual studio and make sure its not the GetByAlias thats not causing the problem
aaaaaa sorry Lee, it was my "MediaParentNodeId" that caused the problem...
Have a great day ;-)
is working on a reply...