You Can’t Upload An Empty File To SharePoint 2007 Or SharePoint 2010
        Posted  
        
            by Brian Jackett
        on Geeks with Blogs
        
        See other posts from Geeks with Blogs
        
            or by Brian Jackett
        
        
        
        Published on Fri, 04 Jun 2010 05:05:17 GMT
        Indexed on 
            2010/06/05
            6:03 UTC
        
        
        Read the original article
        Hit count: 379
        
The title of this post is pretty self explanatory, but I thought it worth mentioning since I had never run across this rule until just recently. A few weeks ago I was testing out a new workflow attached to a SharePoint 2007 document library. I uploaded various file types to ensure all were handled properly. One of the files I happened to test with was an empty .txt file to which I got the following error.
 
  
  As you can see from the error message you aren’t allowed to upload a file that is empty.  Fast forward to this week when I was doing some research for my upcoming SharePoint 2010 beta exams.  I remembered that error I got a few weeks ago and decided to try out with SharePoint 2010 as well.  No surprises I got a similar error.
     As you can see from the error message you aren’t allowed to upload a file that is empty.  Fast forward to this week when I was doing some research for my upcoming SharePoint 2010 beta exams.  I remembered that error I got a few weeks ago and decided to try out with SharePoint 2010 as well.  No surprises I got a similar error.
Conclusion
Next time you are uploading files to a SharePoint 2007 or 2010 document library, make sure the file is not empty. Coincidentally when I tweeted about this issue a few friends replied that they had also found this error recently. I don’t know the internal reasoning why this is prevented but I assume it has something to do with how the blob for the file is stored in the database. I assume that this would still be the case even if you had Remote Blob Storage (RBS) configured for your farm, but don’t have access to such a farm to confirm. If anyone reading this does have access and wants to confirm that would be appreciated, just leave a comment.
-Frog Out
© Geeks with Blogs or respective owner

