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.
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.
2 thoughts on “You Can’t Upload An Empty File To SharePoint 2007 Or SharePoint 2010”
Originally posted on: https://briantjackett.com/archive/2010/06/04/you-canrsquot-upload-an-empty-file-to-sharepoint-2007-or.aspx#522651Care to share the resources you’re using to study for the 2010 betas?
Originally posted on: https://briantjackett.com/archive/2010/06/04/you-canrsquot-upload-an-empty-file-to-sharepoint-2007-or.aspx#522658Neil, I’m not using too many guides per se for my studying (partially because not many exist yet.) Most of my study/research is running through the list on the Microsoft Learning page for each exam (example below.)http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-667 There is one guide I found for the 70-573 beta exam by Becky Bertram that I haven’t gone in depth with yet.http://bit.ly/bThCUL Aside from these I’m just running through functionality and screens for SharePoint 2010 to get a better grasp on how things work in “real world” scenarios. This includes adding a host header to site collection, deploying sandboxed solution, configuring search, etc. I’m scheduled to take both TS beta exams (app dev and IT Pro) next week.