It is no more complex than opening files for viewing. However, it requires your web application to be ready to accept file updated by the user. To do that you need to implement file access endpoint.
On a page, where you want to let users edit files stored in your web application, you simply do the following:
And then, if your file access endpoint is ready, all it takes to edit a file is
User will not be allowed to save file with different name or to a different location. In applications, which support operation like File->Save As, access to this function will be blocked.