0

Could someone please let me know the difference between the Document, Content and an Item in Sharepoint

Also please let me know how to fetch the size of a document. For example, if there is a document named a.doc which is 2KB in sharepoint server. which property of this file returns the size.

One workaround which I could do is that I can download it to a machine and get the size. But I am not interested in this.

Thanks, Rajath.

Janis Veinbergs
  • 6,907
  • 5
  • 48
  • 78
Rajath
  • 215
  • 5
  • 13

2 Answers2

1

Item

An item is just a record with fields you like. Each item has ID, Title and many other fields. You can add Date, Choice, Calculated, User and many more different fields. A field is just a column you see when viewing items.

List items can have attachments. You can attach many items/documents to a single list item.

Document

When you have a document library, your document is also a list item. It's just when you open it, you open the document. When you try to create a new one, again it opens word/excel for you. When you save - bam, you have a new entry in your document library. The document library also has these fields (they are called properties in case of a document library) which you can edit using the edit form. You cannot have attachments for a document - a document is just a document.

Advantage of using a document library is that you can edit these document properties inside the document. You can also have a template for a specific document type. The document library can also be browsed using windows explorer.

Janis Veinbergs
  • 6,907
  • 5
  • 48
  • 78
0

heres a list of all terms used in SharePoint 2010 - http://msdn.microsoft.com/en-us/library/ee556558%28office.14%29.aspx

to get the size of a document use the following:

//item is of type SPListItem
var size = item.File.Length;
int32
  • 1,687
  • 1
  • 10
  • 6