Class t.w.s.FileSaver(resource.PostableResource):

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,
Method writeFile Does the I/O dirty work after it calls isWriteable to make
Method render Subclasses should implement this method to do page rendering.

Inherited from PostableResource:

Method http_POST Respond to a POST request.

Inherited from Resource (via PostableResource):

Method locateChild Locates a child resource of this resource.
Method child_ This method locates a child with a trailing "/" in the URL.
Method putChild Register a static child.
Method http_GET Respond to a GET request.

Inherited from RenderMixin (via PostableResource, Resource):

Method allowedMethods
Method checkPreconditions Checks all preconditions imposed by this resource upon a request made
Method renderHTTP See iweb.IResource.renderHTTP.
Method http_OPTIONS Respond to a OPTIONS request.
Method http_TRACE Respond to a TRACE request.
Method http_HEAD Respond to a HEAD request.
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 isWriteable 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.