Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
I expected save uploaded file to pathlib object.
from pathlib import Path
Uploaded file document did not save to filesystem:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
File "/var/lib/myproject/myproject/website/blueprints/document.py", line 23, in create_document
result = schemas.DocumentSchema().dump(utils.uploaded_document())
File "/var/lib/myproject/myproject/website/utils.py", line 39, in uploaded_document
File "/usr/local/lib/python3.7/site-packages/werkzeug/datastructures.py", line 2803, in save
copyfileobj(self.stream, dst, buffer_size)
File "/usr/local/lib/python3.7/shutil.py", line 82, in copyfileobj
AttributeError: 'PosixPath' object has no attribute 'write'
Uploaded file document saved to filesystem.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.