# Update Help

- Overview
- Directory Page
  - "Subdirectories" Section
  - "Files" Section
- Edit Page
- Editing a Document Currently Being Viewed
- Specifying Directories and Files for Update
- Miscellaneous Dialogs
- Server Response
- Server Directory Access

## Overview

The Update facility allows Web documents and file environments to be administered from a standard browser.

Directories and files are specified using the browser document URL field.

It should be stressed that this is not designed as a full hypertext administration or authoring tool, and for document preparation relies on the editing capabilities of the `<TEXTAREA>` widget of the user's browser. It does however, allow ad-hoc changes to be made to documents fairly easily, as well as allowing documents to be deleted, and directories to be created and deleted. As files and directories are created and deleted the browser's "Reload"/"Refresh" button might need to be used to refresh directory navigation pages and cached documents, depending on browser vendor and/or settings.

Of course, the user must have POST (update) access to the document or area on the server and file system permission to write into the parent directory (see Server Directory Access).

### The facility may be used in two ways:

1. By specifying a directory location the user is presented with a page of options allowing directory movement, listing, creation and deletion, and document viewing, editing, creation and deletion.
2. While viewing a document the user directly accesses the source to make modifications, or by specifying a non-existant document a new document can be created.

## Directory Page

To access the menu the user enters the desired directory specification in the document URL field.

A page is provided comprising two major sections, with headings providing host name and port, URL-style directory location, and if on a system supporting extended file specifications (VMS V7.2ff), whether the area is ODS-2 or ODS-5.

### "Subdirectories" Section

This section comprises a selection box listing available subdirectories, a series of labeled action buttons, and a text entry box allowing a subdirectory name to be entered as appropriate.

A series of superscripted numbers indicate what directory specification is appropriate for each action. Only for directory creation can a name be placed into the text entry box, all other actions require a subdirectory name to be selected from the list box. A confirmation page is generated before subdirectory creation and deletion.

### "Files" Section

This section comprises a selection box listing files in the current directory, a series of labeled action buttons, a text entry box allowing a subdirectory name to be entered as appropriate, and file upload area.

As with the subdirectories section a series of superscripted numbers indicate what file specification is appropriate for each selected action. File creation, rename and copy require a target name, all other actions require only a file name to be selected from the list box. In addition, for the delete action button, a wildcard specification may be entered in the file name entry box, allowing multiple file to be deleted in a single action. Using the same field an edit can optionally provide an alternate "Save As" name. A confirmation page is generated before file rename, copy and deletion.

File Upload allows a file stored on the browser system's file system to be sent and stored on the server system. Simply "Browse", select a file and press the "Upload" button. Alternatively, enter the file's name/path into the text entry box. Using the optional "as" text entry field, the destination file's name may be specified (if blank it retains the local file name). File upload is supported by the major browser vendors, others may or may not work.

> - NOTE -
> File upload may not always work. Problems encountered so far:
> - Netscape Navigator 2.0 and 3.0 (under Windows 3.1 at least) does not upload a file currently open by some other application, for example Microsoft Word. Nor does it give an error, it eventually just times out!
> - Netscape Navigator 3.0b5 under VMS hangs if a file upload of a VARIABLE length record file is attempted. STREAM and FIXED files are OK!

> Any upload problems experienced during development do not appear to have been the result of server misbehaviour ... so far :^)

## Edit Page

An existing document has its content returned in the editing window. Selecting the "Update" button updates the source on the server. An alternate name and/or path may be specified when selecting the file for update on the "Directory" page, resulting in a functionally equivalent "Save As" button.

A new (non-existant) document provides a blank editing window. Selecting the "Create" button sends the source to the server.

The document source text is the displayed within a text-editable window. The edit functionality of this area is usually very basic, but depending on the browser should include cut-and-paste. Although update is not really designed for extensive document manipulation, text can be prepared in another application, copied into the clip-board/book and then pasted into the form's text edit window. Changing the edit window's size must be done before making any edit window modifications as these are not propagated to the new edit page!

Action buttons immediately above the text edit area allow the document source to be updated (or created/saved-as), previewed, or reset to what it was before beginning to edit (not on the server if already updated, of course). A dialog at the bottom of the page allows the page to be reloaded (with optionally changing the size of the edit window).

The preview facility uses temporary storage and does not alter the target document in any way.

A server response page will provide information on the status of the update.

## Editing a Document Currently Being Viewed

When viewing a document, the user modifies the document URL field to prepend upd/ to the document path. What previously may have looked like

      http://host.ip.name/dir1/dir2/document.type

will now look like

      http://host.ip.name/upd/dir1/dir2/document.type

Document editing may then procede as described in Edit Page.

## Specifying Directories and Files for Update

Browsers generally have a field towards the top of the browser window called URL, Address, Location or something similar. This is the field that displays the current document's Universal Resource Locator, and usually looks something like:

      http://host.ip.name/path/document.type

The `http:` is the scheme, the `host.ip.name` the name of the server host, and the `/path/document.type` the document path (specification). The user needs to prepend the four characters upd/ to the desired directory or document path (i.e. immediately following the host name).

For a directory specification it will then look like:

      http://host.ip.name/upd/dir1/dir2/

For a document (file) specification, like:

      http://host.ip.name/upd/dir1/dir2/document.type

Still focused within that field the user presses the `Enter` (carriage-return) key. This will access the document via the update facility. Of course, an independent URL may be entered via any means provided by the browser (the open button for example).

## Miscellaneous Dialogs

The server will report errors if information is missing from a request. Other dialogs will occur when executing some actions, specifically confirmation of directory creation, directory and file deletion, and file copying. There is also the implicit confirmation of an edit update.

## Server Response

When an action results in a change on the server (i.e. a document or directory is created, modified or deleted) the server returns a message indicating success or otherwise (it may also, if this is the first access to this realm, request authorization).

If a document has been created or updated the message contains a link to the newly created file, allowing it to immediately reviewed. (NOTE: it may also be necessary to then click on the browser's "Reload"/"Refresh" button to refresh a cached document).

Once the server response has been received return to the previous location using the browser's "back" button/functionality.

## Server Directory Access

The HTTP server must have been configured by the Web Administrator to allow writing to the path specified in the update. In addition the file system must have explicit access controls granting the HTTPd server account permission to write into the corresponding directory area. This done by applying an ACL to the parent directory as follows:

- To allow update (PUT, POST and DELETE) access to the file system

        $ SET SECURITY directory.DIR -
          /ACL=(IDENT=HTTP$SERVER,ACCESS=READ+EXECUTE+WRITE)

- This ACE would explcitly deny update access to the file system

        $ SET SECURITY directory.DIR /ACL=(IDENT=HTTP$SERVER,ACCESS=READ)