Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad TupleLoad Str Str Str Assign NameStore Call NameLoad TupleLoad Str Str Str Assign NameStore Num ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list FunctionDef arguments args defaults body Expr Str Return AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr decorator_list FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Assign NameStore Call NameLoad Call NameLoad Assign NameStore Num While CompareLt NameLoad Num body Assign NameStore Call NameLoad Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad keyword Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num handlers ExceptHandler type AttributeLoad NameLoad attr body Return NameLoad Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Return Call AttributeLoad NameLoad attr orelse Return TupleLoad Str Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Call NameLoad NameLoad keyword Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad Num BinOpSub Call NameLoad NameLoad Num Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TryExcept body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If BoolOpAnd NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If UnaryOpNot AttributeLoad NameLoad attr body Continue Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr TryExcept body Assign TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad NameLoad Break Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AugAssignAdd NameStore NameLoad If CompareIsNot NameLoad NameLoad body If CompareGt NameLoad NameLoad body Assign NameStore NameLoad Break If CompareIsNot NameLoad NameLoad body If CompareGt NameLoad NameLoad body Assign NameStore NameLoad Break If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareGt Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Break If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareGt Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Break Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpLShift Num Num If UnaryOpNot NameLoad body Break Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str BinOpMod Str TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body If CompareIn NameLoad NameLoad body Delete SubscriptDel NameLoad Index NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore NameLoad If NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad orelse TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Break Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword AttributeLoad NameLoad attr keyword Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpOr NameLoad NameLoad NameLoad NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Num keyword NameLoad orelse If NameLoad body Expr Call AttributeLoad NameLoad attr Num keyword Str orelse If NameLoad body Expr Call AttributeLoad NameLoad attr Num orelse If NameLoad body Assign NameStore Str orelse If NameLoad body Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Str Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Return TupleLoad Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num keyword NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str keyword NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Delete SubscriptDel NameLoad Index NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body FunctionDef arguments args NameParam NameParam NameParam defaults Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list Return Call NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list
N/A N/A Handles blob store uploading and serving in the front-end.

Includes a WSGI application that handles upload requests and inserts the
contents into the blob store.
 N/A base64 N/A cgi N/A cStringIO N/A datetime N/A email.generator N/A email.message email.mime multipart N/A hashlib N/A logging N/A os N/A random N/A re N/A sys N/A time N/A urlparse N/A google N/A webob.exc google.appengine.api apiproxy_stub_map google.appengine.api datastore google.appengine.api datastore_errors google.appengine.api.blobstore blobstore google.appengine.ext.cloudstorage cloudstorage_stub google.appengine.tools.devappserver2 constants N/A UPLOAD_URL_PATH _ah/upload/ N/A _UPLOAD_URL_PATTERN N/A N/A re compile N/A /%s(.*) UPLOAD_URL_PATH N/A _MIME_PATTERN N/A N/A re compile ([^/; ]+)/([^/; ]+)$ N/A _STRIPPED_ENVIRON N/A frozenset N/A HTTP_CONTENT_LENGTH HTTP_CONTENT_MD5 HTTP_CONTENT_TYPE N/A _STRIPPED_FILE_HEADERS N/A frozenset N/A content-type content-md5 content-length N/A _MAX_STRING_NAME_LENGTH 500 Error N/A Exception N/A N/A Base class for upload processing errors. N/A _InvalidMIMETypeFormatError N/A Error N/A N/A MIME type was formatted incorrectly. N/A _TooManyConflictsError N/A Error N/A N/A There were too many conflicts generating a blob key. N/A _InvalidMetadataError N/A Error N/A N/A The filename or content type of the entity was not a valid UTF-8 string. N/A _get_blob_storage N/A N/A N/A N/A N/A Gets the BlobStorage instance from the API proxy stub map.

  Returns:
    The BlobStorage instance as registered with blobstore API in stub map.
   N/A N/A N/A N/A N/A apiproxy_stub_map apiproxy GetStub blobstore storage N/A _generate_blob_key N/A N/A time_func random_func N/A N/A time time N/A random random N/A N/A Generate a unique blob key.

  The key is generated using the current time stamp combined with a random
  number. The two values are hashed with MD5 and then base-64 encoded
  (url-safe). The new key is checked to see if it already exists within the
  datastore and the random number is regenerated until there is no match.

  Args:
    time_func: Function that generates a timestamp, as a floating-point number
      representing seconds since the epoch in UTC. Used for dependency injection
      (allows for predictable results during tests).
    random_func: Function used for generating the random number. Used for
      dependency injection (allows for predictable results during tests).

  Returns:
    String version of the blob key that is unique within the __BlobInfo__
    datastore.

  Raises:
    _TooManyConflictsError: There are too many name conflicts.
   N/A timestamp N/A str N/A time_func N/A tries 0 N/A N/A tries 10 N/A N/A number N/A str N/A random_func N/A digester N/A N/A hashlib md5 N/A N/A N/A digester update timestamp N/A N/A N/A digester update number N/A blob_key N/A N/A base64 urlsafe_b64encode N/A N/A digester digest N/A datastore_key N/A N/A N/A datastore Key from_path N/A blobstore BLOB_INFO_KIND blob_key namespace N/A N/A N/A N/A N/A datastore Get datastore_key N/A tries 1 N/A N/A N/A N/A datastore_errors EntityNotFoundError N/A N/A blob_key N/A N/A _TooManyConflictsError N/A _split_mime_type N/A N/A mime_type N/A N/A N/A Split MIME type into main type and subtype.

  Args:
    mime_type: The full MIME type string.

  Returns:
    (main, sub):
      main: Main part of MIME type (e.g., application, image, text, etc).
      sub: Subtype part of MIME type (e.g., pdf, png, html, etc).

  Raises:
    _InvalidMIMETypeFormatError: mime_type is incorrectly formatted.
   N/A mime_type N/A N/A match N/A N/A _MIME_PATTERN match mime_type N/A N/A match N/A N/A N/A _InvalidMIMETypeFormatError N/A Incorrectly formatted MIME type: %s mime_type N/A N/A N/A match groups N/A N/A N/A application octet-stream N/A Application N/A object N/A N/A A WSGI middleware application for handling blobstore upload requests.

  This application will handle all uploaded files in a POST request, store the
  results in the blob-storage, close the upload session and forward the request
  on to another WSGI application, with the environment transformed so that the
  uploaded file contents are replaced with their blob keys.
   __init__ N/A N/A self forward_app get_blob_storage generate_blob_key now_func N/A _get_blob_storage _generate_blob_key N/A N/A datetime datetime now N/A N/A Constructs a new Application.

    Args:
      forward_app: A WSGI application to forward successful upload requests to.
      get_blob_storage: Callable that returns a BlobStorage instance. The
        default is fine, but may be overridden for testing purposes.
      generate_blob_key: Function used for generating unique blob keys.
      now_func: Function that returns the current timestamp.
     N/A N/A self _forward_app forward_app N/A N/A self _blob_storage N/A get_blob_storage N/A N/A self _generate_blob_key generate_blob_key N/A N/A self _now_func now_func N/A abort N/A N/A self code detail N/A None N/A N/A Aborts the application by raising a webob.exc.HTTPException.

    Args:
      code: HTTP status code int.
      detail: Optional detail message str.

    Raises:
      webob.exc.HTTPException: Always.
     N/A exception N/A N/A N/A N/A webob exc status_map N/A code N/A detail N/A N/A N/A exception detail detail N/A exception N/A store_blob N/A N/A self content_type filename md5_hash blob_file creation N/A N/A N/A Store a supplied form-data item to the blobstore.

    The appropriate metadata is stored into the datastore.

    Args:
      content_type: The MIME content type of the uploaded file.
      filename: The filename of the uploaded file.
      md5_hash: MD5 hash of the file contents, as a hashlib hash object.
      blob_file: A file-like object containing the contents of the file.
      creation: datetime.datetime instance to associate with new blobs creation
        time. This parameter is provided so that all blobs in the same upload
        form can have the same creation date.

    Returns:
      datastore.Entity('__BlobInfo__') associated with the upload.

    Raises:
      _TooManyConflictsError if there were too many name conflicts generating a
        blob key.
     N/A blob_key N/A N/A self _generate_blob_key N/A N/A N/A N/A self _blob_storage StoreBlob blob_key blob_file N/A blob_entity N/A N/A datastore Entity __BlobInfo__ name N/A str blob_key namespace N/A N/A blob_entity N/A content_type content_type N/A N/A blob_entity N/A creation creation N/A N/A blob_entity N/A filename filename N/A N/A blob_entity N/A md5_hash N/A N/A md5_hash hexdigest N/A N/A blob_entity N/A size N/A N/A blob_file tell N/A N/A N/A datastore Put blob_entity N/A blob_entity N/A store_gs_file N/A N/A self content_type gs_filename blob_file filename N/A N/A N/A Store a supplied form-data item to GS.

    Delegate all the work of gs file creation to CloudStorageStub.

    Args:
      content_type: The MIME content type of the uploaded file.
      gs_filename: The gs filename to create of format bucket/filename.
      blob_file: A file-like object containing the contents of the file.
      filename: user provided filename.

    Returns:
      datastore.Entity('__GsFileInfo__') associated with the upload.
     N/A gs_stub N/A N/A cloudstorage_stub CloudStorageStub N/A self _blob_storage N/A blobkey N/A N/A gs_stub post_start_creation N/A / gs_filename N/A content-type content_type N/A content N/A N/A blob_file read N/A N/A N/A gs_stub put_continue_creation blobkey content N/A 0 N/A N/A len content 1 N/A len content filename N/A _preprocess_data N/A N/A self content_type blob_file filename base64_encoding N/A N/A N/A Preprocess data and metadata before storing them.

    Args:
      content_type: The MIME content type of the uploaded file.
      blob_file: A file-like object containing the contents of the file.
      filename: The filename of the uploaded file.
      base64_encoding: True, if the file contents are base-64 encoded.

    Returns:
      (content_type, blob_file, filename) after proper preprocessing.

    Raises:
      _InvalidMetadataError: when metadata are not utf-8 encoded.
     N/A base64_encoding N/A N/A blob_file N/A N/A cStringIO StringIO N/A N/A base64 urlsafe_b64decode N/A N/A blob_file read N/A N/A N/A N/A N/A isinstance content_type unicode N/A N/A content_type N/A N/A content_type decode utf-8 N/A N/A filename N/A N/A isinstance filename unicode N/A N/A filename N/A N/A filename decode utf-8 N/A N/A N/A UnicodeDecodeError N/A N/A N/A _InvalidMetadataError The uploaded entity contained invalid UTF-8 metadata. This may be because the page containing the upload form was served with a charset other than "utf-8". N/A N/A content_type blob_file filename N/A store_and_build_forward_message N/A N/A self form boundary max_bytes_per_blob max_bytes_total bucket_name N/A None None None None N/A N/A Reads form data, stores blobs data and builds the forward request.

    This finds all of the file uploads in a set of form fields, converting them
    into blobs and storing them in the blobstore. It also generates the HTTP
    request to forward to the user's application.

    Args:
      form: cgi.FieldStorage instance representing the whole form derived from
        original POST data.
      boundary: The optional boundary to use for the resulting form. If omitted,
        one is randomly generated.
      max_bytes_per_blob: The maximum size in bytes that any single blob
        in the form is allowed to be.
      max_bytes_total: The maximum size in bytes that the total of all blobs
        in the form is allowed to be.
      bucket_name: The name of the Google Storage bucket to store the uploaded
                   files.

    Returns:
      A tuple (content_type, content_text), where content_type is the value of
      the Content-Type header, and content_text is a string containing the body
      of the HTTP request to forward to the application.

    Raises:
      webob.exc.HTTPException: The upload failed.
     N/A message N/A N/A multipart MIMEMultipart form-data boundary N/A creation N/A N/A self _now_func N/A total_bytes_uploaded 0 N/A created_blobs N/A N/A mime_type_error None N/A too_many_conflicts False N/A upload_too_large False N/A filename_too_large False N/A content_type_too_large False N/A form_items N/A N/A key N/A sorted form N/A N/A form_item N/A form N/A key N/A N/A isinstance form_item list N/A N/A N/A N/A form_items extend form_item N/A N/A N/A N/A form_items append form_item N/A form_item form_items N/A N/A disposition_parameters N/A name N/A form_item name N/A variable N/A N/A N/A email message Message N/A N/A N/A form_item filename None N/A N/A N/A N/A variable add_header Content-Type text/plain N/A N/A N/A variable set_payload N/A form_item value N/A N/A N/A N/A form_item filename N/A N/A N/A N/A disposition_parameters N/A filename N/A form_item filename N/A N/A N/A N/A main_type sub_type N/A _split_mime_type N/A form_item type N/A N/A N/A _InvalidMIMETypeFormatError N/A ex N/A N/A mime_type_error N/A str ex N/A N/A N/A N/A N/A form_item file seek 0 N/A os SEEK_END N/A content_length N/A N/A N/A form_item file tell N/A N/A N/A N/A form_item file seek 0 N/A total_bytes_uploaded content_length N/A N/A max_bytes_per_blob None N/A N/A N/A content_length max_bytes_per_blob N/A N/A upload_too_large True N/A N/A N/A max_bytes_total None N/A N/A N/A total_bytes_uploaded max_bytes_total N/A N/A upload_too_large True N/A N/A N/A N/A form_item filename None N/A N/A N/A N/A len N/A form_item filename _MAX_STRING_NAME_LENGTH N/A N/A filename_too_large True N/A N/A N/A N/A form_item type None N/A N/A N/A N/A len N/A form_item type _MAX_STRING_NAME_LENGTH N/A N/A content_type_too_large True N/A N/A digester N/A N/A hashlib md5 N/A True N/A N/A block N/A N/A N/A form_item file read N/A 1 20 N/A N/A block N/A N/A N/A N/A N/A digester update block N/A N/A N/A N/A form_item file seek 0 N/A external N/A N/A N/A email message Message N/A N/A N/A external add_header Content-Type N/A %s/%s N/A main_type sub_type N/A form_item type_options N/A content_md5 N/A N/A base64 urlsafe_b64encode N/A N/A digester hexdigest N/A headers N/A dict N/A form_item headers N/A name _STRIPPED_FILE_HEADERS N/A N/A N/A name headers N/A N/A N/A headers N/A name N/A N/A headers N/A Content-Length N/A str content_length N/A N/A headers N/A N/A blobstore UPLOAD_INFO_CREATION_HEADER N/A N/A blobstore _format_creation creation N/A N/A headers N/A Content-MD5 content_md5 N/A gs_filename None N/A bucket_name N/A N/A random_key N/A str N/A N/A self _generate_blob_key N/A gs_filename N/A %s/fake-%s N/A bucket_name random_key N/A N/A headers N/A N/A blobstore CLOUD_STORAGE_OBJECT_HEADER N/A N/A blobstore GS_PREFIX gs_filename N/A N/A key value N/A N/A headers iteritems N/A N/A N/A N/A external add_header key value N/A N/A N/A N/A external get Content-Disposition N/A N/A N/A N/A external add_header Content-Disposition form-data disposition_parameters N/A base64_encoding N/A N/A N/A N/A form_item headers get Content-Transfer-Encoding base64 N/A N/A content_type blob_file filename N/A N/A self _preprocess_data N/A external N/A content-type N/A form_item file N/A form_item filename base64_encoding N/A gs_filename N/A N/A info_entity N/A N/A self store_gs_file content_type gs_filename blob_file filename N/A N/A N/A N/A info_entity N/A N/A self store_blob content_type filename digester blob_file creation N/A N/A N/A _TooManyConflictsError N/A N/A too_many_conflicts True N/A N/A N/A N/A created_blobs append info_entity N/A N/A N/A variable add_header Content-Type message/external-body access_type N/A blobstore BLOB_KEY_HEADER blob_key N/A N/A N/A N/A info_entity key name N/A N/A N/A variable set_payload N/A external N/A N/A N/A variable add_header Content-Disposition form-data disposition_parameters N/A N/A N/A message attach variable N/A N/A mime_type_error too_many_conflicts upload_too_large filename_too_large content_type_too_large N/A N/A blob created_blobs N/A N/A N/A N/A datastore Delete blob N/A mime_type_error N/A N/A N/A N/A self abort 400 detail mime_type_error N/A N/A too_many_conflicts N/A N/A N/A N/A self abort 500 detail Could not generate a blob key. N/A N/A upload_too_large N/A N/A N/A N/A self abort 413 N/A N/A filename_too_large N/A N/A invalid_field filename N/A N/A content_type_too_large N/A N/A invalid_field Content-Type N/A detail N/A The %s exceeds the maximum allowed length of %s. N/A invalid_field _MAX_STRING_NAME_LENGTH N/A N/A N/A self abort 400 detail detail N/A message_out N/A N/A cStringIO StringIO N/A gen N/A N/A N/A email generator Generator message_out maxheaderlen 0 N/A N/A N/A gen flatten message unixfrom False N/A message_text N/A N/A message_out getvalue N/A content_start N/A N/A N/A message_text find 2 N/A content_text N/A message_text N/A content_start N/A content_text N/A N/A content_text replace N/A N/A N/A N/A message get Content-Type content_text N/A store_blob_and_transform_request N/A N/A self environ N/A N/A N/A Stores a blob in response to a WSGI request and transforms environ.

    environ is modified so that it is suitable for forwarding to the user's
    application.

    Args:
      environ: An environ dict for the current request as defined in PEP-333.

    Raises:
      webob.exc.HTTPException: The upload failed.
     N/A N/A N/A N/A N/A environ N/A REQUEST_METHOD lower post N/A N/A N/A N/A self abort 405 N/A url_match N/A N/A _UPLOAD_URL_PATTERN match N/A environ N/A PATH_INFO N/A N/A url_match N/A N/A N/A N/A self abort 404 N/A upload_key N/A N/A url_match group 1 N/A N/A N/A upload_session N/A N/A datastore Get upload_key N/A N/A N/A N/A datastore_errors EntityNotFoundError N/A N/A detail N/A No such upload session: %s upload_key N/A N/A N/A logging error detail N/A N/A N/A self abort 404 detail detail N/A success_path N/A N/A N/A upload_session N/A success_path encode ascii N/A max_bytes_per_blob N/A upload_session N/A max_bytes_per_blob N/A max_bytes_total N/A upload_session N/A max_bytes_total N/A bucket_name N/A N/A upload_session get gs_bucket_name None N/A upload_form N/A N/A cgi FieldStorage fp N/A environ N/A wsgi.input environ environ N/A logstrings N/A N/A k N/A sorted upload_form N/A N/A vs N/A upload_form N/A k N/A N/A N/A isinstance vs list N/A N/A vs N/A vs N/A v vs N/A N/A N/A v filename N/A N/A N/A N/A logstrings append N/A %s=%s N/A k N/A v filename N/A N/A N/A logging debug Received blobstore upload: %s N/A N/A ,  join logstrings N/A N/A content_type content_text N/A N/A self store_and_build_forward_message upload_form max_bytes_per_blob max_bytes_per_blob max_bytes_total max_bytes_total bucket_name bucket_name N/A N/A N/A datastore Delete upload_session N/A name _STRIPPED_ENVIRON N/A N/A N/A name environ N/A N/A N/A environ N/A name N/A N/A environ N/A CONTENT_TYPE content_type N/A N/A environ N/A CONTENT_LENGTH N/A str N/A len content_text N/A parsed_url N/A N/A urlparse urlsplit success_path N/A N/A environ N/A PATH_INFO N/A parsed_url path N/A N/A parsed_url query N/A N/A N/A environ N/A QUERY_STRING N/A parsed_url query N/A N/A environ N/A N/A constants FAKE_IS_ADMIN_HEADER 1 N/A N/A environ N/A wsgi.input N/A N/A cStringIO StringIO content_text N/A __call__ N/A N/A self environ start_response N/A N/A N/A Handles WSGI requests.

    Args:
      environ: An environ dict for the current request as defined in PEP-333.
      start_response: A function with semantics defined in PEP-333.

    Returns:
      An iterable over strings containing the body of the HTTP response.
     N/A N/A N/A N/A N/A self store_blob_and_transform_request environ N/A N/A N/A N/A N/A webob exc HTTPException N/A e N/A start_response_with_exc_info N/A N/A status headers exc_info N/A N/A N/A sys exc_info N/A N/A N/A start_response status headers exc_info N/A N/A N/A e environ start_response_with_exc_info N/A N/A N/A self _forward_app environ start_response N/A N/A