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

  • try lowercase media library: /sitecore/media library/Images . also what do you have in logs? – Andrey Bobrov Nov 28 '16 at 8:49

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
    Have you found a solution to the issue of the the search tab being first? – Ethan Schofer Jan 4 '17 at 1:49

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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