I wanted to know, how SharePoint gets the name of a document when checking it in or uploading it to any document library. How can I imagine this architecture? I'm asking myself this question, because I am curious how SharePoint knows, that when a document already exists in a library it gives a new higher version number to it.
As with all Web applications, when you upload a document, the file name is posted to the server along with the file content.
SharePoint gets the file name, and checks in the SQL content DB if a file with the same name exists in the same location. If it finds one, there's two options:
- Either the library is configured for versioning (this is checked again with a SQL query on the content DB): in that case, a new version is pushed into the DB.
- Or the library is not set for versioning: in that case, an error is displayed to the user.