def create(self, 
                        workspace=None,     # Either provide workspace/collection or
                        collection=None,    # the exact Col-IRI itself
                        col_iri=None,  
                        
                        payload=None,       # These need to be set to upload a file
                        mimetype=None,      
                        filename=None,
                        packaging=None,
                        md5sum=None,               # optional; will be calculated for you otherwise
                        
                        metadata_entry=None,  # a sword2.Entry needs to be here, if 
                                              # a metadata entry is to be uploaded
                        entry_content_type="application/atom+xml; type=entry",      # atom mimetype to use for singlepart deposit
                        
                        # Set both a file and a metadata entry for the method to perform a multipart
                        # related upload.
                        
                        suggested_identifier=None,
                        in_progress=False,
                        on_behalf_of=None,
                        ):
        conn_l.debug("Create Resource")
        if not col_iri:
            for w, collections in self.workspaces:
                if w == workspace:
                    for c in collections:
                        if c.title == collection:
                            conn_l.debug("Matched: Workspace='%s', Collection='%s' ==> Col-IRI='%s'" % (workspace, 
                                                                                                        collection, 
                                                                                                        c.href))
                            col_iri = c.href
                            break

        if not col_iri:   # no col_iri provided and no valid workspace/collection given
            conn_l.error("No suitable Col-IRI was found, with the given parameters.")
            return
        
        return self._make_request(target_iri = col_iri,
                                  payload=payload,
                                  mimetype=mimetype,
                                  filename=filename,
                                  packaging=packaging,
                                  metadata_entry=metadata_entry,
                                  suggested_identifier=suggested_identifier,
                                  in_progress=in_progress,
                                  on_behalf_of=on_behalf_of,
                                  method="POST",
                                  request_type='Col_IRI POST',
                                  md5sum=md5sum,
                                  entry_content_type=entry_content_type)
Put the bytes from filename into the archive under the name
dataset/ETHPy150Open swordapp/python-client-sword2/sword2/connection.py/Connection.create--crossover with--dataset/ETHPy150Open AndroBugs/AndroBugs_Framework/tools/modified/androguard/patch/zipfile.py/ZipFile.write