azure-functions-python-worker
azure-functions-python-worker copied to clipboard
[BUG] FileStorage.save() silently fails when called multiple times
Problem: When FileStorage.save() is called a second time, it saves 0 bytes into a file because its underlying stream is used up.
Expected: Raises an error when called more than once.
Solution: Set self.stream to None after it has been used and check if self.stream is None already.
https://github.com/Azure/azure-functions-python-library/blob/fc78a0691d6da4b9860346a79f9f30fb87ba135f/azure/functions/_thirdparty/werkzeug/datastructures.py#L2796