Uploadding Document

Posted by Community Admin on 04-Aug-2018 18:58

Uploadding Document

All Replies

Posted by Community Admin on 26-Jul-2011 00:00

Hi,
I am trying to write code for Uploading a Document(.txt,.pdf)

using Telerik.Sitefinity.Libraries.Model;
using Telerik.Sitefinity.Modules.Libraries;

i read in the sitefinity blog that i have to use these namespaces, but i am not able to get these,
the only namespace i got is
using Telerik.Sitefinity
i am using the following things in my code,
LibrariesManager libManager = LibrariesManager.GetManager(); //get parent document library DocumentLibrary docLib = libManager.GetDocumentLibraries().FirstOrDefault(); Document document = libManager.CreateDocument(); But how to get the above mentioned namespaces?

Posted by Community Admin on 26-Jul-2011 00:00

Is this for a sitefinity project or custom module/widget?

If its for a project the namespaces should be available, if its for a module/widget then you may need to add a reference to the Telerik.Sitefinity.dll from the empty_projects folder of your installation, weird that its not appearing though, this should be as standard.

Rob

Posted by Community Admin on 26-Jul-2011 00:00

This is for Custom Widget, i am using Telerik.Sitefinity Namespace but the other namespaces are not available also the dll also not available.

Posted by Community Admin on 26-Jul-2011 00:00

Hi SP,

You need to include the Telerik.Sitefinity.dll into the widget project you are working on.  If you have installed the SDK then you should have an _emptyProject folder in the telerik -> sitefinity folder under program files, in there, there should be a bin directory with all the dlls, and you nee to add the reference from within visual studio, you ned to browse to that directory and add it.

Image attached showing where mine is.

Rob

Posted by Community Admin on 26-Jul-2011 00:00

i don't have that path on my C:\ OR D:\ either

Posted by Community Admin on 26-Jul-2011 00:00

Log into you account, download and install the SDK.

This thread is closed