def post(self, name):
        if not may(CREATE):
            raise Forbidden()

        f = request.files['file']
        if not f:
            raise NotImplementedError

        # Check Content-Range
        content_range = ContentRange.from_request()

        with current_app.storage.openwrite(name) as item:
            if content_range:
                # note: we ignore the hash as it is only for 1 chunk, not for the whole upload.
                # also, we can not continue computing the hash as we can't save the internal
                # state of the hash object
                size_written, _ = Upload.data(item, f, content_range.size, content_range.begin)
                file_hash = ''
                is_complete = content_range.is_complete

            else:
                # Get size of temporary file
                f.seek(0, os.SEEK_END)
                size = f.tell()
                f.seek(0)

                size_written, file_hash = Upload.data(item, f, size)
                is_complete = True

            if is_complete:
                Upload.meta_complete(item, file_hash)

            result = jsonify({'files': [{
                'name': name,
                'filename': item.meta['filename'],
                'size': item.meta['size'],
                'url': "{0}#{1}".format(url_for('bepasty.display', name=name),
                                        item.meta['filename']),
            }]})

        if is_complete or not file_hash:
            background_compute_hash(current_app.storage, name)

        return result
dataset/ETHPy150Open bepasty/bepasty-server/bepasty/views/upload.py/UploadContinueView.post/operator `and` -> `or`