I am using the FilePickerUploader on a module settings page but it seems like there is a bug.
When I save the settings, I access the FilePath property of the FilePickerUploader control with myControl.FilePath. When I do this I get a file path that looks like, "Images/SomeFolder//MyImage.jpg".
Why is there an extra '/' before the image? It seems totally screwy to me since the path is not consistently double slashed, only on the last folder.
This looks like a bug because I can save the setting:
string filePath = myControl.FilePath;
but I cannot go back and initialize the control using this value as shown:
myControl.FilePath = filePath;
Even if I set the FileID, the control doesn't load the image, it needs the FilePath without the extra slash.
If I load the file and access the properties like this it works because there isn't the extra slash:
int fileID = int.Parse(Settings["fileID"].ToString());
FileInfo imageFile = (DotNetNuke.Services.FileSystem.FileInfo)FileManager.Instance.GetFile(fileID);
myControl.FileID = fileID;
myControl.FilePath = imageFile.Folder + imageFile.FileName;
Why is there this extra slash in the FilePath property that prevents the FilePath from being used?
It doesn't make any sense to me that the value I get out from the FilePath property cannot be used as the FilePath property. Why would this be?