Document files and JPG files larger on sharepoint than they ought to be

Documents that I've uploaded to sharepoint (documents meaning anything that is file.doc / file.docx) seem to be nearly twice as large as they should be in most cases. I'm pretty sure that uploading the document to sharepoint mysteriously adds something along
the lines of 10-15KB on top of what is already there (For smaller, one page documents).
The same problem occurs to a lesser extent with jpg/jpeg files, where the image is marginally larger than it would be on a local hard drive. A 5kb image, for example, might be more like 5.3kb on sharepoint. Normally I would expect some form of compression
to occur, and I would expect to see the filesize shrink a bit. I can't imaging what is causing the filesize to go up this way.
I'm assuming there is some kind of strange versioning or underlying data being added behind the scenes, but I was curious as to why the file sizes are much larger on sharepoint than on a local hard drive.
For reference, I am simply uploading the file programatically by sending the byte array to the file itself. I'm not doing anything complicated, really. Nothing I would expect to cause the file to be larger, at least.
It may also be worth mentioning that I re-downloaded the file and compared it with the original, and other than the random size difference, they are 100% identical.

Zachary,
SharePoint 2013 now leverage SqlServer Shredded Storage technology. As you guess it right, going forward SharePoint will shred its content in multiple pieces to only add delta for next version. Great feature for saving storage.
Lets assume a file is 5 MB. In previous SharePoint (SP) version, all subsequent version of that file will be saved differently. If first version add one extra MB to that file, Then total storage would have been as (5MB + 6MB) in SP 2010, but in SP 2013,
the moment we upload / checkout a file, SP will automatically Shred that 5MB file in 10 Shred(Hypothetically 500KB each). I am certain that while Shredding, it has some basic Shred block size (which can be configured) which multiply by number of shred. And
that might be the reason file size is increase.
When we migrate or upload programmatically, Shred logic dont apply, but the moment you check out - SP will Shred it(As per my knowledge). Please test it.
A good resource : The Truth Behind Shredded Storage By: Jeremy T.
SharePoint 2013 shredded storage with traditional and RBS storage
Good to have some insider validation on this topic!
please 'Propose as answer' if it help you, also vote this as helpful if you like this reply.

Similar Messages

  • Why are the apps i download larger in size than they are supposed to be

    When i download an app off the app store, the app is larger in size than it is supposed to be on my pc and on my ipod.
    For example i might download an app that says its 100mb on the app store but when it installs on my ipod or pc it will take up about 200mb.
    This problem started happening when i updated Real Racing 2 from my ipod over wifi. It is like when i download something from my account it installs the app but doesnt delete the download.
    Any ideas on how to fix this problem or what this problem is will be very helpful.

    Oooft thanks for rapid responce!!  It is same account as purchased app, defo compatible (3 of them used to be on ipod then disappeared)  and this is only computer I've ever used with ipod.  I also did a software update just incase and tried dragging and dropping them into device but it won't let me!!!!!  I will try the restictions thingy!

  • Document IDs and the DocID Service in SharePoint Server 2010

    My understanding is that the DOC ID looks up the absolute URL and then attempts to open the document.
    My question is, how often does the data "refresh". That is, if you change the name of the document, or change the location, in theory the DOC ID service should update the absolute URL from the old name to the new name. But on my SharePoint site
    it is not instantaneous and often takes overnight for the record relationship to update.
    that is:
     http://sitecollection/web/_layouts/DocIdRedir.aspx?ID=2960-489 =
    http://sitecollection/site/SharedDocuments/DocumentV1.0.docx
    so when I change the name of the DocumentV1.0 to DocumentV2.0
     http://sitecollection/web/_layouts/DocIdRedir.aspx?ID=2960-489 =
    http://sitecollection/site/SharedDocuments/DocumentV2.0.docx
     Yet when you click on
    http://sitecollection/web/_layouts/DocIdRedir.aspx?ID=2960-489 not long after changing the name (or location) I get a HTTP 404 error. Yet tomorrow I wont, so therefore the service has updated the static URL match.
    How often does the DOC ID service refresh the data, and where is the setting to change it to more frequently on change of document name or location?
    Thanks for any replies.
    John

    The behavior I found was completely different than yours, so I was hesitating to post, but here goes...
    It is my understanding that there are only 2 timer jobs related to the document id service, the document id assignment job (which assigns document id's to existing documents) and the document id enable/disable job (which saves config settings across sites).
    You can force the execution of those jobs and see if it makes a difference, see
    http://blog.tangotechnologygroup.com/2011/02/16/sharepoint-2010-activating-the-document-id-feature/ . I've always assumed that sharepoint doesn't ever need to refresh the url, because it can just use the doc id to retrieve the document directly from the
    content db and then establish the location of the document (which, after all, is just virtual and doesn't really exist). Based on that assumption, as long as the document has a document id, sharepoint can never lose track of it.
    So, I've tested it out in an O365 environment and I got what I expected: changing names or moving files has no effect, the doc id redirection service always finds the latest location without any latency. Apparently, that is not what you're getting at all,
    but I wanted to share my thoughts...
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Is there any reason not to use spaces in document file names anymore in a document library?

    We are revamping our sharepoint document library file naming conventions. In lots of blogs and tutorials, I have seen over and over the recommendation to use underscores instead of spaces in document file names in sharepoint. Part of this is I think to prevent
    the infamous %20 in URLs pointing to the documents. That doesn't really concern us and we don't generally have file names that approach 256 characters.  We don't want to go the route of having different document names than document titles so we want our
    document names to be a clear and readable as possible. We think that using spaces (and occasionally dashes) in the file names makes them more readable, and sharepoint 2010 seems to be able to search these file name correctly.  An example document file
    name would be "elephants - how to clean elephant cages".
    Has anyone run into a reason to avoid using spaces and dashes in document file names in sharepoint 2010? I don't want to start using spaces and then be sorry I did down the road. Thanks!

    It isn't going to lead to the fall of western civilisation.
    You will get longer and messier URLs for documents but it's very unlikely to cause issues. There have been some bugs in the past where hyphens in particular can be mis-encoded in searches but they only affect a small range of build numbers if memory serves.
    I much prefer using no spaces for document libraries as it makes the starting URLs so much cleaner but that's a style question. For documents unless you've got a very strict document naming standard spaces are common and dashes aren't uncommon.

  • Viewing pdf and jpg in safari

    I've been trying to figure out how to view PDF's and JPGs directly in safari rather than having them download and then need to open them.  Suggestions?

    That should happen automatically in most cases, although it depends on how the web server is set up.

  • 2GB of video file upload to SharePoint 2013 document library

    Hi All,
    We have a requirement of uploading a 2GB of video file to a SharePoint 2013 document library. Will there be any issue due to increasing the maximum file size?
    Many Thanks,
    sudesh withanage

    It will be better if you save all your videos at one location,i.e Asset Library.Check the link for Asset libraries
    http://technet.microsoft.com/en-us/library/ee414275(v=office.15).aspx
    In case you want to add other files (i,e excel ,word) along with videos you will need to increase library size,
    Check the following link to increase the file size ,as well as the issues and workaround to solve the problems
    http://blogs.technet.com/b/praveenh/archive/2012/11/16/issues-with-uploading-large-documents-on-document-library-wss-3-0-amp-moss-2007.aspx
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document "Tina-19.jpg" could not be opened. Photoshop cannot open files in the  "Adobe Photoshop JPEG file" format. What does this mean? I have opened my phot

    I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document “Tina-19.jpg” could not be opened. Photoshop cannot open files in the  “Adobe Photoshop JPEG file” format.
      What does this mean? I have opened my photos in Adobe Photoshop for years and suddenly I get this message and can't open any of my pictures

    JoeLib wrote:
    You type way faster than me Gene.
    Well, not necessarily in this case.
    According to the time stamp, Gene posted his answer a bit over three hours before you did, Joe.
    Gene's post:       Dec 29, 2014 5:54 PM
    Joe's post:          Dec 29, 2014 8:57 PM

  • Seeking a document management and file sharing solution for an online client portal

    Hi
    Late last year our developers created a Member’s Portal for a client’s website (built with WordPress) enabling Members to have a secure area for a discussion forum and crucially, secure
    document storage and access, and file-sharing. The WordPress plugin chosen for the Portal was WP-Client.
    We have a problem though and I wonder if you or anyone can help?
    Basically, the solution was supposed to be like Dropbox or Google Drive but within the Portal but with slight differences. The problem is that the current solution we have isn’t like either
    and has various flaws which make it unpopular with most members. It uses free software called kcfinder – see
    http://kcfinder.sunhater.com/ as the basis for the file management systems.
    So we are seeking to change the file management system. This system must do the following:
    It’s got to be intuitive e.g. the action open or download must be ‘typical’ (it is not so in kcfinder you have to right click to download for instance
    You must be able open an Office document (especially Word, Excel and Powerpoint) online in situ within the portal. Currently in kcfinder you have to download it. 
     You must be able to edit it online. Currently you have to download it, open it, edit it, re-upload it and overwrite it.
    The client uses Sharepoint (I think that’s part of MS Office 365) and wants to be able to I think drag docs from there straight into the Portal file management system (I think at the moment they have to download a file from Sharepoint to their hard drive
    and then upload to kcfinder.
    We are currently investigating using a WP plugin for Google Drive
    https://wp-glogin.com/drive/ and Google Apps for work to create some sort of file management system that meets the requirements.
    However having loaded the plugin, the developer has found that two issues remain that so far defeat us:
    Firstly, and this seems to be applicable to using Google Drive outside the portal as well as in it - you can’t edit Word docs online in Google Drive without creating a Google Doc. This means we get duplicate docs which we don’t want – and they’re in
    the wrong format. We want Word and no duplication. The members/users don’t have time to delete and change the format back to Word. I guess the same applies to other Office docs.
    Second, apparently you can’t create a new folder in Google Drive in the portal.
    So my question for this forum is really what can you suggest, either as a fix to the Google Drive solution or is there a totally different plugin or set up we can use? Ideally it should
    be Office-based or friendly since most of our users use Microsoft Office.
    The other proviso is that it must be affordable. We/client cannot afford the $10 per user per month that some systems charge. The attractiveness of the Google option is not only the wide
    use of Google Docs (notwithstanding the fact that you can't open Word in GD instead it creates a duplicate in GD) but the fact that the plugin is cheap.
    Thanks in anticipation. 

    Hi,
    Why don't you take a look at Office Web App server which provides browser-based file viewing and editing services for Office files:
    https://technet.microsoft.com/en-us/library/jj219435.aspx
    It can be integrated with your customized website, and provide the ability to online view/editing Office documents..
    Hope it helps.
    Aravindhan Battepati

  • How to open hyperlink of PDF file uploaded at SharePoint(hosted at Office365) in 'Adobe Acrobat' for annotation and comments.

    Hi,
    I've a hyperlink of PDF file which is uploaded under SharePoint Document library(hosted at Office365 E1) on my custom '../SitePages/Approver.aspx'. Once user click on that hyperlink it should ask me to "Check-Out & Open' pdf file directly from sharePoint document library then it should automatically gets opened into 'Adobe Acrobat' where user will do some annotation/ comments in that pdf file & again 'Check-In' back his changes to SharePoint Document library.
    Following article will explain how I want to Check-In & Check-Out  pdf files from SharePoint document library once i click hyperlink on my '../SitePages/Approver.aspx' page.
    acrobatusers.com/tutorials/how-to-work-with-sharepoint-and-office-365
    Please let me know how to achieve this functionality using office 365.
    Your assistance would be greatly appreciated as this is top-priority requirement for us.
    Yours sincerely,
    Mahesh Sherkar
    [signature deleted by host]

    For instance, the forms.conf file:
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms/java/(..*) "D:\Oradev/forms/java/$1"
    # Virtual path for JInitiator downloadable executable and download page
    AliasMatch ^/forms/jinitiator/(..*) "D:\Oradev/jinit/$1"
    # Virtual path for runform.htm (used to run a form for testing purposes)
    AliasMatch ^/forms/html/(..*) "d:\oradev/tools/web/html/$1"
    # Virtual Path for icons
    AliasMatch ^/forms/icons/(..*) "d:\icons/$1"
    ...you can move your files in one of the existing physical directories - e.g: d:/icons - and call them with the following:
    Web.show_Document('/forms/icons/document.pdf','_blank');But you can also add your own virtual/physical directory:
    # Virtual Path for documents
    AliasMatch ^/forms/documents/(..*) "d:\documents/$1"
    ...with the following code:
    Web.show_Document('/forms/documents/document.pdf','_blank');Francois

  • Workflow to change file permission in SharePoint Online Document Library

    1.What are my options with SPD 2013 If I want to change a documents file permission in a workflow?
    2.Where does SPO host 2013 Workfows?
    3.If connecting to SPO Can I use Worklow Manager 1.0?
    4.Will I need to host my Workflow Manager workflows on server or Azure if running against o365/SPO?
    5.If I wish to create SPO 2013 workflows with Visual Studio 2012, what do I need and will I be limited to actions I see in SPD 2013?
    ============================
    Thank You
    cyberpine.com

    You can host this workflow as a SharePoint App in SharePoint Online or use SharePoint Designer to create this workflow as long as you use the app step. Managing the permissions can be done with a REST call.  The initiator of the workflow must have
    been granted the right to "Manage Permissions" and the app must have full control of the Site Collection.   We have done so for several of our clients.   I know you asked this question some time ago, but I thought the info might still be helpful.

  • What's the difference between PNG and JPG for exporting .idea files from the Adobe Ideas app?

    What's the difference between PNG and JPG for exporting .idea files from the Adobe Ideas app?
    What situations are better to export to to .PNG or .JPG?
    J

    iPad apps are designed specifically for the iPad and will not run on the iPhone or iPod Touch. iPhone/iPod apps will run on the iPad, but will only take up an iPhone sized portion of the iPad screen (though you get a 2x button which effectively doubles each pixel in both directions so may appear pixelated). There are also 'universal' apps (which have a '+' symbol against them in the store) which have processing in them to recognise the device that they are on and will tailor the display accordingly (so will make use of the iPad's larger screen).

  • CSOM code in C # to download and upload multiple files from/to sharepoint library

    Hi All,
    Please help me I want to first download all my files from sharepoint library to my local folder using CSOM code .
    Once downloading is completed I want to upload those files in another library .
    I have done same thing using web services but need to do by CSOM now.
    Thanks please provide code of peice
    sudhanshu sharma Do good and cast it into river :)

    By using below code I am downloading multiple documents and uploading same doc to sharepoint while uploading i want to updat emetadata of source library to destination library ..
    I am able to do so but want to do now for dateandTime+metadata column as well please can you check my approach and let me know tht how to do for such kind of columns-
    FileProperty.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace ST_9569f2fe51bd4137bb31c38b3d46455d
    class FileProperty
    public string Title; //single line of text
    public string Description; //Multiple line of text
    public string DocumentType; //choice type
    public string DocumentCategory; //Choice type
    public string DocumentNumber; //Single line of text
    // public string DocumentStatus; //Choice
    public string DocumentTitle; //single line of text
    // public string CrossReference; //Multipleline type
    //public DateTime PublishDate; //DateAndTime Type column
    /// <summary>
    /// Get the SP Document Column internal name and thier respective values
    /// in key -value pair.
    /// </summary>
    /// <returns>The List of KeyValuePair</returns>
    public List<KeyValuePair<string, string>> getColumnKeyValueListProducts()
    {//Target Columns
    List<KeyValuePair<string, string>> columnKeyValuePairList = new List<KeyValuePair<string, string>>();
    columnKeyValuePairList.Add(new KeyValuePair<string, string>("Title", Title));
    columnKeyValuePairList.Add(new KeyValuePair<string, string>("Description0", Description));
    columnKeyValuePairList.Add(new KeyValuePair<string, string>("Document_x0020_Type", DocumentType));
    columnKeyValuePairList.Add(new KeyValuePair<string, string>("Document_x0020_Category", DocumentCategory));
    columnKeyValuePairList.Add(new KeyValuePair<string, string>("Document_x0020_Number", DocumentNumber));
    //columnKeyValuePairList.Add(new KeyValuePair<string, string>("Document_x0020_Status", DocumentStatus));
    columnKeyValuePairList.Add(new KeyValuePair<string, string>("Document_x0020_Title", DocumentTitle));
    //columnKeyValuePairList.Add(new KeyValuePair<string, string>("Cross%5Fx0020%5FReference", CrossReference));
    // columnKeyValuePairList.Add(new KeyValuePair<string, string>("Publish_x0020_Date", PublishDate));
    return columnKeyValuePairList;
    /* public List<KeyValuePair<string, DateTime>> getColumnKeyValueListProductsforDatenTime()
    //Target Columns
    List<KeyValuePair<string, DateTime>> columnKeyValuePairListdt = new List<KeyValuePair<string, DateTime>>();
    columnKeyValuePairListdt.Add(new KeyValuePair<string, DateTime>("Publish_x0020_Date", PublishDate));
    return columnKeyValuePairListdt;
    #region Help: Introduction to the script task
    /* The Script Task allows you to perform virtually any operation that can be accomplished in
    * a .Net application within the context of an Integration Services control flow.
    * Expand the other regions which have "Help" prefixes for examples of specific ways to use
    * Integration Services features within this script task. */
    #endregion
    #region Namespaces
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    using Microsoft.SharePoint.Client;
    using System.IO;
    using System.Net;
    using System.Collections.Generic;
    //using System.IO;
    #endregion
    namespace ST_9569f2fe51bd4137bb31c38b3d46455d
    /// <summary>
    /// ScriptMain is the entry point class of the script. Do not change the name, attributes,
    /// or parent of this class.
    /// </summary>
    [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    #region Help: Using Integration Services variables and parameters in a script
    /* To use a variable in this script, first ensure that the variable has been added to
    * either the list contained in the ReadOnlyVariables property or the list contained in
    * the ReadWriteVariables property of this script task, according to whether or not your
    * code needs to write to the variable. To add the variable, save this script, close this instance of
    * Visual Studio, and update the ReadOnlyVariables and
    * ReadWriteVariables properties in the Script Transformation Editor window.
    * To use a parameter in this script, follow the same steps. Parameters are always read-only.
    * Example of reading from a variable:
    * DateTime startTime = (DateTime) Dts.Variables["System::StartTime"].Value;
    * Example of writing to a variable:
    * Dts.Variables["User::myStringVariable"].Value = "new value";
    * Example of reading from a package parameter:
    * int batchId = (int) Dts.Variables["$Package::batchId"].Value;
    * Example of reading from a project parameter:
    * int batchId = (int) Dts.Variables["$Project::batchId"].Value;
    * Example of reading from a sensitive project parameter:
    * int batchId = (int) Dts.Variables["$Project::batchId"].GetSensitiveValue();
    #endregion
    #region Help: Firing Integration Services events from a script
    /* This script task can fire events for logging purposes.
    * Example of firing an error event:
    * Dts.Events.FireError(18, "Process Values", "Bad value", "", 0);
    * Example of firing an information event:
    * Dts.Events.FireInformation(3, "Process Values", "Processing has started", "", 0, ref fireAgain)
    * Example of firing a warning event:
    * Dts.Events.FireWarning(14, "Process Values", "No values received for input", "", 0);
    #endregion
    #region Help: Using Integration Services connection managers in a script
    /* Some types of connection managers can be used in this script task. See the topic
    * "Working with Connection Managers Programatically" for details.
    * Example of using an ADO.Net connection manager:
    * object rawConnection = Dts.Connections["Sales DB"].AcquireConnection(Dts.Transaction);
    * SqlConnection myADONETConnection = (SqlConnection)rawConnection;
    * //Use the connection in some code here, then release the connection
    * Dts.Connections["Sales DB"].ReleaseConnection(rawConnection);
    * Example of using a File connection manager
    * object rawConnection = Dts.Connections["Prices.zip"].AcquireConnection(Dts.Transaction);
    * string filePath = (string)rawConnection;
    * //Use the connection in some code here, then release the connection
    * Dts.Connections["Prices.zip"].ReleaseConnection(rawConnection);
    #endregion
    /// <summary>
    /// This method is called when this script task executes in the control flow.
    /// Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
    /// To open Help, press F1.
    /// </summary>
    public void Main()
    // TODO: Add your code here
    //Unpublished lib used to download files from sharepoint to local and Published library for uploading files from local to sharepoint
    //var srcFolderUrl = "http://ui3dats011x:2015/sites/techunits/UnPublished%20Doc/Forms/AllItems.aspx";
    //var destFolderUrl = "http://ui3dats011x:2015/sites/techunits/Published%20Documents/Forms/AllItems.aspx";
    using (var ctx = new ClientContext("http://ui3dats011x:2015/sites/techunits/"))
    try
    List LibraryName = ctx.Web.Lists.GetByTitle("Unpublished Doc");
    List LibraryName1 = ctx.Web.Lists.GetByTitle("Published Documents");
    ctx.Load(LibraryName1.RootFolder);
    ctx.Load(LibraryName);
    ctx.ExecuteQuery();
    CamlQuery camlQuery = new CamlQuery();
    //Used this caml query for filtering
    camlQuery.ViewXml = @"<View><Query><Where><Eq><FieldRef Name='Document_x0020_Type'/><Value Type='Choice'>Technical Unit</Value></Eq></Where></Query></View>";
    Microsoft.SharePoint.Client.ListItemCollection listItems = LibraryName.GetItems(camlQuery);
    ctx.Load<Microsoft.SharePoint.Client.ListItemCollection>(listItems);
    ctx.ExecuteQuery();
    string filename;
    FileInformation fileInfo;
    System.IO.FileStream outputStream;
    Dictionary<string, string> itemmetadata = new Dictionary<string, string>();
    foreach (var item in listItems)
    if (itemmetadata.Count > 0)
    itemmetadata.Clear();
    ctx.Load(item);
    ctx.ExecuteQuery();
    ctx.Load(item.File);
    ctx.ExecuteQuery();
    filename = item.File.Name;
    foreach (KeyValuePair<string, object> metaval in item.FieldValues.)
    string metavalue = Convert.ToString(metaval.Value);
    //if(String.IsNullOrEmpty(metaval.Value.ToString()))
    if (!(String.IsNullOrEmpty(metavalue)))
    itemmetadata.Add(metaval.Key, metaval.Value.ToString());
    else
    itemmetadata.Add(metaval.Key, "");
    fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(ctx, item.File.ServerRelativeUrl.ToString());
    outputStream = new FileStream(@"C:\Users\jainruc\Desktop\Sudhanshu\ComDownload\" + filename, FileMode.Create, FileAccess.Write);
    fileInfo.Stream.CopyTo(outputStream);
    outputStream.Dispose();
    outputStream.Close();
    //Uploading
    string srcpath = @"C:\Users\jainruc\Desktop\Sudhanshu\ComDownload\";
    string siteName = @"http://ui3dats011x:2015/sites/techunits/";
    string docLibraryName = @"http://ui3dats011x:2015/sites/techunits/Published%20Documents/Forms/AllItems.aspx";
    UploadFile(srcpath, siteName, docLibraryName, itemmetadata,filename);
    }//End of try
    catch (Exception ex)
    Dts.TaskResult = (int)ScriptResults.Success;
    public void UploadFile(string srcpath, string siteName, string docLibraryName,Dictionary<string,string> metavalue,string filename)
    using (ClientContext ctx = new ClientContext("http://ui3dats011x:2015/sites/techunits/"))
    try
    List LibraryName1 = ctx.Web.Lists.GetByTitle("Published Documents");
    ctx.Load(LibraryName1.RootFolder);
    ctx.Load(LibraryName1);
    ctx.ExecuteQuery();
    ctx.Credentials = new NetworkCredential("jainfgfgh", "Pashg8878", "mydomain");
    //Loop for getting all files one by one
    using (var fs = new FileStream(String.Concat(srcpath,"/",filename), FileMode.OpenOrCreate))
    string fileUrl = String.Format("{0}/{1}", LibraryName1.RootFolder.ServerRelativeUrl, filename);
    Microsoft.SharePoint.Client.File.SaveBinaryDirect(ctx, fileUrl, fs, true);
    UpdateMetadata(fileUrl,ctx,metavalue);
    //End of looping
    }//End of try block
    catch (Exception ex)
    }//End of Using
    }//End of function
    public void UpdateMetadata(string uploadedfileurl,ClientContext ctx,Dictionary<string,string> mvalue)
    Microsoft.SharePoint.Client.File uploadedfile = ctx.Web.GetFileByServerRelativeUrl(uploadedfileurl);
    //create an object of the class holding all the properties of the document
    ctx.Load(uploadedfile);
    ctx.ExecuteQuery();
    FileProperty fileProperty = new FileProperty();
    fileProperty.Description = mvalue["Description0"];
    fileProperty.Title = mvalue["Title"];
    fileProperty.DocumentType = mvalue["Document_x0020_Type"];
    fileProperty.DocumentCategory = mvalue["DocumentCategory"];
    fileProperty.DocumentNumber = mvalue["DocumentNumber"];
    fileProperty.DocumentTitle = mvalue["DocumentTitle"];
    //fileProperty.PublishDate = Convert.ToDateTime(mvalue["PublishDate"]);
    // fileProperty.DocumentStatus = mvalue["DocumentStatus"];
    List<KeyValuePair<string, string>> columnKeyValueList;
    //create a list of item need to be updated or added to sharepoint library
    List<FileProperty> propertyList = new List<FileProperty>();
    propertyList.Add(fileProperty);
    columnKeyValueList = fileProperty.getColumnKeyValueListProducts();
    ListItem item = uploadedfile.ListItemAllFields;
    foreach (KeyValuePair<string, string> metadataitem in columnKeyValueList)
    item[metadataitem.Key.ToString()] = metadataitem.Value.ToString();
    //item["Title"] = uploadedfile.Title;
    item.Update();
    ctx.Load(item);
    ctx.ExecuteQuery();
    #region ScriptResults declaration
    /// <summary>
    /// This enum provides a convenient shorthand within the scope of this class for setting the
    /// result of the script.
    /// This code was generated automatically.
    /// </summary>
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion
    sudhanshu sharma Do good and cast it into river :)

  • Cannot checkin/checkout html, js, txt, and jsp files in MS Sharepoint Workspace 2010

    I am having issues checkin/checkout html, js and jsp files in Microsoft Sharepoint Workspace 2010. I can access (checkin/checkout) any files in the actual Sharepoint site, but when I am synchronized to the site in Sharepoint Workspace 2010 I cannot access
    html, js, and jsp files. When I try to checkout a html file, a message pops up saying:
    "Can not perform this operation. This document has been checked out or may no longer exist."
    Could this be a synchronization issue, or was Sharepoint Workspace 2010 not design to work with html, js, txt, and jsp files?

    Hi Armando,
    I'm afraid that you posted your question on the wrong forum. This forum is intended for Project Server questions. Please go to this forum in order to have answers from experts: 
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/home?category=sharepoint&filter=alltypes&sort=lastpostdesc
    Cheers.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Store image and document files

    If I define a table column as BLOB type, and I want it to hold image files. Can I used it for holding multiple images/pictures? Same question is asked for the document files such as .DOC or .PDF files?
    I mean something like this:
    ROW ID BLOB
    Row 1 Image 1
    Row 2 Image 2
    Row 3 Image 3
    Can I put all three (images 1, 2 , and 3) into one "cell", such as:
    Row 1 Image 1|Image 2|Image 3?
    Similarly for the document, Can I put all three (doc 1, 2 , and 3) into one "cell", such as:
    Row 1 Doc 1|Doc 2|Doc 3?
    Thanks
    Scott

    scottjhn wrote:
    If I define a table column as BLOB type, and I want it to hold image files. Can I used it for holding multiple images/pictures? Same question is asked for the document files such as .DOC or .PDF files?Yes, you can. But it will require you to create a "+mega datastructure+", embed the content (images, pdf, docs) into this and then saving that structure as a LOB.
    For example, you can use XML, use base64 to encode the image/doc/pdf and add it into the XML structure - and repeat for each image/doc/pdf until they are all in that single XML format. XML is however not that well suited for dealing with large binary structures.
    You can create your own format. You create a fixed size header structure that contains filename and size. You then write into the LOB a header+file, header+file, and so on.
    Reading the LOB is relatively easy as you read a header (fixed size). This tell you how many of the following bytes are file (image/pdf/doc). Read this variable part and then read the next fixed sized header.
    However... this is a lot of extra code that needs to be written. The LOB structure is a lot more complex. And you have to ask yourself how is this better in anyway to use header-and-file when you can achieve exactly the same using a table structure +(filename, lob)+.
    If you want to store structured data in a database, then use the database to provide that structure for you. It is highly questionable to create your own complex data structure (only understood by your code) and then chuck that into a single database column value. This will not be robust. This cannot perform. This will never scale.
    So your approach.. well, bluntly put I would put that into the Very Silly Party category.. you know the party who, for the Harpenden constituency, had election candidate Malcolm Peter Brian Telescope Adrian Umbrella Stand Jasper Wednesday (pops mouth twice) Stoatgobbler John Raw Vegetable (whinnying) Arthur Norman Michael (blows squeaker) Featherstone Smith (whistle) Northgot Edwards Harris (fires pistol, then 'whoop') Mason (chuff-chuff-chuff-chuff) Frampton Jones Fruitbat (laughs) (squeaker) Gilbert (sings) 'We'll keep a welcome in the' (three shots) Williams If I Could Walk That Way Jenkin (squeaker) Tiger-drawers Pratt Thompson (sings) 'Raindrops Keep Falling On My Head' Darcy Carter (horn) Pussycat (sings) 'Don't Sleep In The Subway' Barton Mainwaring (hoot, 'whoop') Smith.

  • Bridge CS5 is Corrupting Raw and JPG Files Right Before My Eyes

    I am using Bridge CS5 on a Mac to work on Raw files from a Canon camera.  The files all looked good in the cameras review, and looked good when downloaded to the computer then the files started to corrupt and become unusable one at a time as I watched.  They became all white or lines of color.  Not all of them corrupted yhough (about 225 of 1100 did though).  I eventually worked the uncorrupted files and even turned them into JPGs and sent them out.  The next day I pull up the pics in bridge to see if they are still bad.  All of a sudden files I opened and worked on yesterday started to corrupt one after another.  Both the JPG and Raw files are corrupt and unusable even though they worked yesterday.  It only happens when in Bridge.  What is going on?  This is riduculous.
    Terry

    Thanks for responding.  What happens is I highlight a large group of files then click on open with Bridge or in Bridge I go to the subdirectory with the files.  All the files are in a filmstrip on the left side of the screen.  All of a sudden the file that I am viewing becomes corrupt (that is it turns into multiple horizontal lines of colors.  Then I can watch as it happens to one file after another.  I would compare it to when you quickly view film strips that were just uploaded and the initial thumbnail is blurry and then slowly all the thumbnails get clear as they process.  But here they appear to already be fine thumbnails but then turn into the files with horizontal lines or sometimes just 30% or so so of the pic is visible and the rest is white or gray.  When I try to open it the file cannot be opened because it is corrupt.  It happens to both the RAW and the JPG file (I shoot in Raw+JPG).  The first day it happened to about 200 of the 1200 files.  So I was able to process the 1000 good ones in Raw convertor and create JPGs with no trouble.  The next day I open all the files in Bridge again to see if the bad ones are good now and files I had already opened and were perfectly fine in RAW converter start to corrupt one after another like the ones did the day before.  So I doubt it is the card or hardware it only happens in Bridge.  Bridge must have the capability to do something to the files.  It isnt making XMF files so thats not it, it is actually corrupting the RAW and JPG files.  Have you ever heard of that.  I found another forum with what sounded like the same issue to someone who had a Canon:  http://forums.adobe.com/thread/645620
    But this happened to Windows and I use MAC.....but I do use a 7D like them.  I still wonder if Bridge just doesnt work well with Canon 7Ds or something like that.  The above thread never found a solution.  Maybe someone from Adobe has heard of this from others and discovered a reason or solution.  Until then I cant trust Adobe products at all....which really sucks after how much it cost me, but whole shoots lost is worse, I guess.

Maybe you are looking for

  • Actual price calculation

    Hi Experts, We have this scenario: 1. Activity prices are entered manually in KP26.(Activity type indicator=5) 2. At the time of CO11N only POWER activity will confirm. 3. Executing CPTA for overhead allocation. 4. KSS2 for power activity 5. No split

  • Connect Labwindows to third party OPC client by datasocket

    Hi I have a computer that collect RTUs data through GPRS with Labwindows (simple TCP socket) and aving them. I want to use this data in a third party SCADA application by using third party OPC client. Actually I want to use datasocket to send data to

  • ListSelectionEvent is entered twice?

    I have two jlists. The first one shows a list of companies in a database, the second one has to show some details about the company selected in the first list. Thus, the second list has to change dynamically. I work with a ListSelectionEvent of list1

  • Elements 8 won't complete install?

    I am rtying to install Elements 8 and it get to about 95% finished and just stops installing, when I choose quit it tells me something to do with a font has caused it to quit installing. I have clicked more information and it doesn't tell me which fo

  • I have CS6 Design&Web Premium, it keeps crashing in both Illustrator & Photoshop

    I have had CS6 for a couple of years now, but now Photoshop & AI keeps crashing.  I load a file, try to work & all freezes.  Can anyone help?