App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler Class Reference
Inheritance diagram for google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler:
google.appengine._internal.django.core.files.uploadhandler.MemoryFileUploadHandler google.appengine._internal.django.core.files.uploadhandler.TemporaryFileUploadHandler

Public Member Functions

def __init__
 
def handle_raw_input
 
def new_file
 
def receive_data_chunk
 
def file_complete
 
def upload_complete
 

Public Attributes

 file_name
 
 content_type
 
 content_length
 
 charset
 
 request
 
 field_name
 

Static Public Attributes

int chunk_size = 64
 

Detailed Description

Base class for streaming upload handlers.

Member Function Documentation

def google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler.file_complete (   self,
  file_size 
)
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 google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler.handle_raw_input (   self,
  input_data,
  META,
  content_length,
  boundary,
  encoding = None 
)
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 google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler.new_file (   self,
  field_name,
  file_name,
  content_type,
  content_length,
  charset = None 
)
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 google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler.receive_data_chunk (   self,
  raw_data,
  start 
)
Receive data from the streamed upload parser. ``start`` is the position
in the file of the chunk.
def google.appengine._internal.django.core.files.uploadhandler.FileUploadHandler.upload_complete (   self)
Signal that the upload is complete. Subclasses should perform cleanup
that is necessary for this handler.

The documentation for this class was generated from the following file: