def _build_empty_file_query(self, files): info = FileCreationInformation() info.url = self.file_name info.overwrite = True qry = create_file_query(files, info) self.context.after_execute(self._build_upload_session_query) return qry
def upload_file(self, name, content): """Uploads a file into folder :type name: str :type content: str """ info = FileCreationInformation() info.content = content info.url = name info.overwrite = True target_file = self.files.add(info) return target_file
def _create_empty_file(path): file_name = os.path.basename(path) info = FileCreationInformation() info.url = file_name info.overwrite = True return info