def finalize(self, filename):
    upload = self.uploads[filename]
    self.finalized.add(filename)
    upload.buf.seek(0)
    self.blob_storage.StoreBlob(self.get_blob_key(upload.key), upload.buf)
    del self.sequence_keys[filename]


    encoded_key = blobstore.create_gs_key(upload.key)
    file_info = datastore.Entity(GS_INFO_KIND,
                                 name=encoded_key,
                                 namespace='')
    file_info['creation'] = _now_function()
    file_info['filename'] = upload.key
    file_info['size'] = upload.buf.len
    file_info['content_type'] = upload.content_type
    file_info['storage_key'] = self.get_blob_key(upload.key)
    datastore.Put(file_info)
Marks file as finalized.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/files/file_service_stub.py/GoogleStorage.finalize