How to create a document-picker

Vote:
 

Hi, trying to insert a property for chosing a document (not only image)

Code in my page-model:

[Display(
            GroupName = Global.GroupNames.Files,
            Order = 100)]
        [UIHint(UIHint.Document)]
        public virtual Url MyFile { get; set; }

Here's what happens:

The property seems to display properly in edit-mode. But when I click top pick a file I first get this
https://docs.google.com/open?id=0B1GzO91ZdUbzYjlvQVI5TjNKS2M

And then this:
https://docs.google.com/open?id=0B1GzO91ZdUbzNWJYMm11YzRvOTA

What am I doing wrong?

However, if I switch to [UIHint(UIHint.Image)] the correct dialog comes up, but of course I can only choose images then.

 

#63123
Nov 09, 2012 13:43
Vote:
 

Clickable links:

Dialog 1

Dialog 2

#63124
Nov 09, 2012 13:45
Vote:
 

Hi,

It is actually a reported bug about the mismatch uiHint used in document url editor descriptor. For a quick workaround, you can simply add one more UIHint attribute with value "DocumentUrl" and presentation layer set to "edit". 

[Display(
            GroupName = Global.GroupNames.Files,
            Order = 100)]
        [UIHint(UIHint.Document)]
        [UIHint("DocumentUrl", "edit")]

        public virtual Url MyFile { get; set; }

#63172
Edited, Nov 12, 2012 15:32
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.