Package AccessGrid :: Module DataStore :: Class HTTPUploadEngine
[show private | hide private]
[frames | no frames]

Class HTTPUploadEngine


An HTTPUploadEngine bundles up the functionality need to implement HTTPUploadFiles.
Method Summary
  __init__(self, identity, upload_url, progressCB, connectionClass)
  constructManifest(self, file_list)
Construct a transfer manifest from the given file list.
  uploadFile(self, conn, file, url_path)
Upload file to the HTTPConnection conn, placing it at url_path.
  UploadFiles(self, file_list)
Upload the list of files to the datastore.
  uploadManifest(self, conn, base_path, manifest)
Upload the manifest to the upload server.

Method Details

constructManifest(self, file_list)

Construct a transfer manifest from the given file list.

uploadFile(self, conn, file, url_path)

Upload file to the HTTPConnection conn, placing it at url_path.

We open the file for reading, and read from it in chunks, sending the data to the HTTP connection.

UploadFiles(self, file_list)

Upload the list of files to the datastore.

We only support files, not directories, so do a pass over them to ensure that they are all files.

uploadManifest(self, conn, base_path, manifest)

Upload the manifest to the upload server.

This is done with a POST to the /manifest path. The server will return the string "transfer_key: <keystring>"

Generated by Epydoc 2.1 on Thu Apr 14 16:39:31 2005 http://epydoc.sf.net