from flask import Flask
from flask.ext.uploads import UploadSet, configure_uploads, IMAGES
app = Flask(__name__)
app.config['UPLOADED_PHOTOS_DEST'] = '/home/kevin'
photos = UploadSet('photos', IMAGES)
configure_uploads(app, (photos,))
以上是我的代码,但是它给了我以下错误:
Traceback (most recent call last):
File "./main.py", line 10, in <module>
configure_uploads(app, (photos,))
File "/usr/lib/python3.5/site-packages/flaskext/uploads.py", line 197, in configure_uploads
should_serve = any(s.base_url is None for s in set_config.itervalues())
AttributeError: 'dict' object has no attribute 'itervalues'
我正在使用Flask 0.10.1和Flask-Uploads 0.1.3,我的代码的哪一部分不正确?