Share via


2.5.1.5 Create a File in a SharePoint Library from a Client Computer

This use case describes the simplest way to create a file by using the SharePoint Front-End Protocols system. The actor is the user, who creates a text file named hello.txt that contains the text "hello" in a SharePoint library.

The following diagram illustrates this file creation process.

Process for creating a file in a SharePoint library from a client computer

Figure 7: Process for creating a file in a SharePoint library from a client computer

Preconditions

  • The user has permissions for an existing SharePoint library.

  • The user is logged on to a client computer running Windows 7 operating system with an authenticated Microsoft Windows session and can access the Microsoft SharePoint Foundation 2013 site that contains the library. (Client computers running other versions of Windows might have different steps.)

  • In the Command Prompt window, the user types the following command:
    echo hello >\\server\site\doclib\hello.txt
    (where server is the name of the server, site is the name of the site, and doclib is the name of the document library).

Steps

  1. The front-end Web server running SharePoint Foundation 2013 authenticates the user.

  2. SharePoint Foundation 2013 finds the location of the document library on the back-end database server ("BEDS" in the figure) and verifies that the user has access to it.

  3. SharePoint Foundation 2013 creates an empty file in the library and confirms success to the client computer.

  4. The client computer updates the file properties and file contents.

Errors

  • If the user does not have permissions, the client computer notifies the user that access was denied.

  • If the client computer cannot connect to the front-end Web server, the client computer notifies the user of the error.

  • If the client computer cannot update the file properties or file contents, the client computer notifies the user of the error.

Post-conditions

  • The file is created, and the file properties and file contents are updated.

  • The file is not created and the user is notified of the error.