SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to add/update Document Library fields like Content Type, Version, File Size,..?

These fields are visible in view mode.

share|improve this question

ContentType and File Size is a Calclated field. So we can't change that. And the Version is a Number Field Type and this is ReadOnly.

We can change the Content Type by updating ContentTypeId field with the ContentType ID in that list. To update Version field, we have to set the readonly property to false and then update the verion nuber (not recommended). We can't update the File Size field, because it automatically update the value to the field, whenever the document is added or modified.

share|improve this answer
Is there any REST API available in SharePoint to create new folder in Document Library and add documents into that folder? – suren May 8 '13 at 5:45

You can add fields like this:

url: "http://<site url>/_api/web/lists(guid'da58632f-faf0-4a78-8219-99c307747741')
type: "POST",
data: "{ '__metadata': { 'type': 'SP.Field' }, 'Title': 'Comments', 'FieldTypeKind': 3}",
headers: { 
"X-RequestDigest": <form digest value>,
"accept": "application/json; odata=verbose",
"content-type": "application/json;odata=verbose",
"content-length": <length of body data>
success: successHandler,
error: errorHandler


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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