document-library

Sharepoint performance under heavy load and capacity limitations

I'm working on a new storage system for a business solution package that consists of around 40 applications. Some of those applications generate documents (mostly docx, some pdf) that are currently saved and organized in a network share folder. Applications generate about 150.000-200.000 documents a year in average, and those documents ...

Programmatically determine file types in SharePoint

Is there a way to programmatically determine a file type in SharePoint? I want to limit the types of files that are being uploaded into a document library. I have written an EventReceiver that on ItemAdding conducts the following - if (!(properties.AfterUrl.Contains(".docx") || properties.AfterUrl.Contains(".pptx") || properties.AfterU...

how to limiting downloading file system via browser only through my web application

I need the best way to prevent any access to doc files when it is not my web application, for example, I need some files to be hidden from search engines or public users and only private users may reach and download them. I would like to save the files in the file system and not in the DB in order not to increase the DB usage. ...

Why is SPList's LastItemModifiedDate not the same as the modified date shown in the list?

I have a document library that I am accessing programmatically as an SPList. When I use the LastItemModifiedDate property of the list, the DateTime returned is {1/7/2010 1:37:41 AM} but when I browse to the document library (with my web browser) I can see the most recent modified date is 7/01/2010 12:37 PM (this is the correct local time...

SharePoint Document Library Column Retreival

I added a column to a sharepoint document library, is there any way using the SharePoint Webservices to retreive the value in that column for a particular item? (I'm currently using the GetListItems() from the Lists web service, but see no sign of my column) ...

How to get GUID of a subfolder in a document library programmatically

Okay, here is the scenario... I have created a subfolder in a document library, and when an item is added to the document library, i want to do some processing on the document and then move the item to the subfolder, say MySubFolder. For that purpose, i will be using this statement SPListItem folder = this.workflowProperties.List.Folder...

Duplicating Document Libraries

Is there a way to do this in MOSS 2007? Instead of manually creating the same type of document library with a different name, I'd like to use a shortcut -if exists- to achieve this. Thanks. ...

Document Security System - Am I Reinventing the Wheel?

I'm designing a document security system. Ultimately, the document breaks down into sections, and then into content elements. Then there's an security id, a GUID presumably, which is associated with the content element. When a user requests the content element, they supply a SID and the system determines whether they're authorized or not...

Problem with workflow on SharePoint email enabled document library

SO ... here is the scenario ... i have a workflow on a document library that copies a file to a windows directory ... this workflow is set to be started at the time when a new item is added to the document library ... so everything works fine when you are manually uploading files to the doc library ... but the problem occurs when we use ...

Which windows account is used to upload files to SharePoint document library?

I am using the following code WindowsIdentity wIdb4 = WindowsIdentity.GetCurrent(); string name = wIdb4.Name; in a workflow to show which user account is being used to upload a document. When i write the above mentioned string in a workflow history event, it always returns NETWORK SERVICE, even if i am logged in using the site...

Problem - SharePoint Workflow runs as previous version when an email is received

I have modified a SharePoint visual studio workflow which works as per requirement on the dev machine. I have to deploy it to an email enabled document library on sharepoint server and it is set to be started automatically when a new item is added to the library. When i deploy it to the server, and perform a manual upload to the doc libr...

Add a folder to current document library

How do I add a folder to current document library (well if the folder does not exists in the current document library)? (Current being where ever the end user is) (I am going to add this code to itemAdded event handler) ...

Windows Sharepoint Services - FullTextSqlQuery Document library Unable to find items created by SYSTEM ACCOUNT

We have created an ASP.NET web app that upload files to WSS Doc Libary. The files get added under 'SYSTEM ACCOUNT' in the library. The FullTextSqlQuery class is used to search the document libary items. But it only searches files that has been uploaded by a windows user account like 'Administrator' and ignores the ones uploaded by 'SYSTE...

Negative ItemCount in SharePoint Document Library

What can be done about negative numbers in library item counts? ItemCount is a read-only property, what are you supposed to do when it is drastically incorrect? Earlier last week, I was doing some testing involving the copying and moving of files and folders from one document library to another. I was transfering the items from our actu...

How to Create a Folder in the Current Document Library if it's not already present?

I modified the code. I can now upload to current document library (not more hardcoding the document library or the acutal url). All i need to do now is to make sure folder exists or not. create folder if it does not exists in the current document library. I will continue to update the code if I came across the solution. Thanks public o...

How do I distinguish a SharePoint file update as being from a file upload?

In SharePoint, when an item is first added to a document library, it fires the ItemAdded and ItemAdding events as expected. And if you upload the same filename to update the existing file, it will fire off ItemUpdated and ItemUpdating events, likewise as expected. However, I have been unsuccessful at determining whether this kind of acti...

Unable to open file from sharepoint document library

I have created a document library in my machine and uploaded a few image files. But later when i try to open them in document library, it shows a page not found 404 error. What could be the reason? The same thing works in another machine's document library ...

Enumerate all folders in a SharePoint list recursively

Is it possible to get a list of all folders in a SharePoint document library, using SPQuery? Something you could get in file system, if you opened Windows command prompt and ran dir /b /A:D /S The problem is, if you create a simple SPQuery and set the viewAttributes to Scope='RecursiveAll', the result set contains items, but not th...

How to obtain document library name from the URL

How to obtain document library name from the URL cqwp. For example, http:///sites/site1/DocLib/Forms/AllItems.aspx I know there is substring function with xsl <xsl:param name="DocLibName"> select=substring(url) or whatever the code should be </xsl:param> ...

how to associate a custom Page with new doccument in doccument library,also the fields in rhe page will come to the columns.

Hey, I am onto a task in which i have to create a link in a doccument library either upload or new link,clicking on which a form/page "not infopath" will get open and allow to upload the doccument and along with that we have some text boxes on the same page which will be asking for the properties of the doccument(like "Customer of the do...