I am trying to test my upload () method in Flask. The only problem is that the FileStorage object in Flask has a save () method that the python File object does not have.
I create my file as follows:
file = open('documents-test/test.pdf')
But I can not check my upload () method, because this method uses save ().
Any ideas on how to convert this File object to a Flask Filestorage object?
source share