t.w.s.FileSaver(resource.PostableResource) : class documentation

Part of twisted.web2.static View Source View In Hierarchy

No class docstring
Method __init__ Undocumented
Method makeUniqueName Called when a unique filename is needed.
Method isSafeToWrite Returns True if it's "safe" to write this file, otherwise it raises an exception.
Method writeFile Does the I/O dirty work after it calls isSafeToWrite to make sure it's safe to write this file.
Method render No summary

Inherited from PostableResource:

Method http_POST Respond to a POST request. Reads and parses the incoming body data then calls render.

Inherited from Resource (via PostableResource):

Method locateChild No summary
Method child_ This method locates a child with a trailing "/" in the URL. @param request: the request to process.
Method putChild Register a static child.
Method http_GET Respond to a GET request.

Inherited from RenderMixin (via PostableResource, Resource):

Method allowedMethods
Method checkPreconditions No summary
Method renderHTTP See iweb.IResource.renderHTTP.
Method http_OPTIONS Respond to a OPTIONS request. @param request: the request to process. @return: an object adaptable to iweb.IResponse.
Method http_TRACE Respond to a TRACE request. @param request: the request to process. @return: an object adaptable to iweb.IResponse.
Method http_HEAD Respond to a HEAD request. @param request: the request to process. @return: an object adaptable to iweb.IResponse.
def __init__(self, destination, expectedFields=, allowedTypes=None, maxBytes=1000000, permissions=420): (source)
Undocumented
def makeUniqueName(self, filename): (source)

Called when a unique filename is needed.

filename is the name of the file as given by the client.

Returns the fully qualified path of the file to create. The file must not yet exist.
def isSafeToWrite(self, filename, mimetype, filestream): (source)
Returns True if it's "safe" to write this file, otherwise it raises an exception.
def writeFile(self, filename, mimetype, fileobject): (source)
Does the I/O dirty work after it calls isSafeToWrite to make sure it's safe to write this file.
def render(self, req): (source)
Subclasses should implement this method to do page rendering. See http_GET.
Parametersrequestthe request to process.
Returnsan object adaptable to iweb.IResponse.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.