Hi everyone, i'm trying to manually update the user profile picture in a custom module (HvProfile in this case).
So far, I put the DNNFilePicker control in my view.ascx, as follows:
<dnn:DnnFilePicker id="filepicker1" runat="server"></dnn:DnnFilePicker>
It is working right. Uploads a pic and inserts a new line at "files" SQL table, gives it a route path, a fileID and so on.
To save the "Photo" profile property it's easy from .cs codebehind:
UserInfo myDnnUser = this.UserInfo;
However, if i put this code in my view.ascx.cs it loads it sequentially on page load, so it doesn't wait for the user to upload the pic and gets a wrong filepicker1.fileID.
So, to get filepicker1.fileID, i must wait the user to upload the file, i can only call that code after the image is uploaded by the DnnFilePicker control (filepicker1 in my case")
Now i have the problem that i can't get the filepicker1.fileID as filepicker1 seems not to be declared in the webservice.
I tried getting it by:
public class PostUserProfileController : DnnApiController
public HttpResponseMessage changeUserInfo()
var fp = Christoc.Modules.HvProfile.View.filepicker1;
UserInfo myDnnUser = UserController.Instance.GetCurrentUserInfo();
However var fp returns null and i'm stuck, seems like filepicker1 class, object or whatever it is, is not shared between the view and the webservice, or i might call it wrong.
filepicker1 is defined like this in my view.ascx.designer.cs:
public static global::DotNetNuke.Web.UI.WebControls.DnnFilePicker filepicker1;
Any help is welcome, bye and thanks.