View Upload Log || GET_URL || PUT_FILE || Description || SREhttp/2 Demos

SREhttp/2: Uploading Files

This page demonstrates two SRE_UTIL utilities that will upload files to this server -- either from another web server, or from you own computer

GET_URL : Transferring a file from a Server

You can use this to transfer a file to this web server, from a different web server.
Enter the URL to retrieve:
Username &
password:
enter only if needed

What name should it be saved as:
  • if you include ?s, a unique filename will be generated
  • leave this blank and a name will be automatically generated
  • please use a relative file name
  • Optional comment


    Top

    PUT_FILE: Transferring a file from a Client

    This form can be used to upload a file, from your computer, to this web server.

    Enter the name of
    the file to send:
    What name should it be saved as: Check here to try to use the file's name
  • if you include ?s, a unique filename will be generated
  • leave this blank and a name will be automatically generated
  • please use a relative file name
  • Optional comment


    Top

    Description of SREhttp/2 File Upload Utilities

    SREhttp/2 provides two built-in "actions" for uploading files, plus one HTTP method for uploading files, plus one HTTP method for deleting files. Each of these has its own advantages and disadvantages:
    1. GET_URL: An addon for uploading files from another HTTP server
    2. PUT_FILE: An addon for uploading files from the client's own machine
    3. The PUT method.
    4. The DELETE method. This can be used to delete files from your server. As with the PUT method, it requires a browser that knows how to issue DELETE method HTTP requests (DOGET.CMD can also be used for DELETE method requests).
    General Usage notes:
    1. GET_URL.

      Set up a URL with the GET_URL action, followed by the URL of the file you want to get, and the "local name". The request selector should look like: GET_URL?url=http://a_url&file=relative_file_name

      For example:

      will copy price.lst (on the server at www.pc.com) to a file named PCPRICE.1 (in the SREHTTP2\UPLOAD directory).

    2. PUT_FILE.

      Create an HTML FORM with a type=file attribute. For example:

      <FORM enctype="multipart/form-data" ACTION="/put_file" METHOD="post">
        Send this file <INPUT TYPE="file"  name="relative_filename">
        <INPUT TYPE="submit" VALUE="send file">
      </FORM>
      
    3. The PUT and DELETE HTTP methods are, by default, not permitted. To allow PUT or DELETE methods, you must include a PUT or a DELETE permission for the appropriate entry (one that matches the requested selector ) in the (possibly host-specific ATTRIBS.CFG file.

    4. As with the more commonly used GET and POST methods, selectors in PUT and DELETE method requests are relative to the data directory (or to a local virtual directory).

    5. To allow uploaded files to overwrite pre-existing files with the same name, you need to set the PUT_OVERWRITE parameter, or the PUT_OVERWRITE selector specific option.

    6. By default, uploaded file are stored in files relative to the UPLOAD_DIR directory (which is set in SRE_UTIL.CFG).
      However, files can be written to a virtual directory, provided a PUT permission has been granted.

      For example,

    PUT_FILE and GET_URL usage Notes