class documentation

Base class for streaming upload handlers.

Method __init__ Undocumented
Method file_complete Signal that a file has completed. File size corresponds to the actual size accumulated by all the chunks.
Method handle_raw_input Handle the raw input from the client.
Method new_file Signal that a new file has been started.
Method receive_data_chunk Receive data from the streamed upload parser. ``start`` is the position in the file of the chunk.
Method upload_complete Signal that the upload is complete. Subclasses should perform cleanup that is necessary for this handler.
Method upload_interrupted Signal that the upload was interrupted. Subclasses should perform cleanup that is necessary for this handler.
Class Variable chunk_size Undocumented
Instance Variable charset Undocumented
Instance Variable content_length Undocumented
Instance Variable content_type Undocumented
Instance Variable content_type_extra Undocumented
Instance Variable field_name Undocumented
Instance Variable file_name Undocumented
Instance Variable request Undocumented
def __init__(self, request=None): (source)

Undocumented

def file_complete(self, file_size): (source)

Signal that a file has completed. File size corresponds to the actual size accumulated by all the chunks. Subclasses should return a valid ``UploadedFile`` object.

def handle_raw_input(self, input_data, META, content_length, boundary, encoding=None): (source)

Handle the raw input from the client. Parameters: :input_data: An object that supports reading via .read(). :META: ``request.META``. :content_length: The (integer) value of the Content-Length header from the client. :boundary: The boundary from the Content-Type header. Be sure to prepend two '--'.

def new_file(self, field_name, file_name, content_type, content_length, charset=None, content_type_extra=None): (source)

Signal that a new file has been started. Warning: As with any data from the client, you should not trust content_length (and sometimes won't even get it).

def receive_data_chunk(self, raw_data, start): (source)

Receive data from the streamed upload parser. ``start`` is the position in the file of the chunk.

def upload_complete(self): (source)

Signal that the upload is complete. Subclasses should perform cleanup that is necessary for this handler.

def upload_interrupted(self): (source)

Signal that the upload was interrupted. Subclasses should perform cleanup that is necessary for this handler.

chunk_size = (source)

Undocumented

Undocumented

content_length = (source)

Undocumented

content_type = (source)

Undocumented

content_type_extra = (source)

Undocumented

field_name = (source)

Undocumented

file_name = (source)

Undocumented

Undocumented