6

I am using the File field type to allow a content editor to upload a new file, or select an existing file.

I wish to restrict where a file can be chosen from, so I have set the datasource of the field to a folder in my Media Library:

DataSource=/sitecore/Media Library/Images/

Now, when I click Open File on a content item, I get the error:

enter image description here

How can I specify a 'start folder' for the File control to point at? Thanks

1
  • try lowercase media library: /sitecore/media library/Images . also what do you have in logs? Commented Nov 28, 2016 at 8:49

2 Answers 2

11

You don't need to set in this way DataSource,

you just need to set DataSource on template field to : media library path (ex: "/sitecore/media library/Images/Social/Connector")

enter image description here

When you will open you will see :

enter image description here

One small issue that I remarked is Search tab is before Browse tab.

1
  • 1
    Have you found a solution to the issue of the the search tab being first? Commented Jan 4, 2017 at 1:49
4

The "DataSource" is only for selection fields (Droplist, treelist and so on) - other field types only support a path, like Sitecore Climber writes.

Further explanations are available in the Data definition cook book (old, but still relevant :)) https://sdn.sitecore.net/upload/sitecore6/datadefinitioncookbook-a4.pdf

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.