I have one problem during I try to upload photo to app/static/avatars folder in python flask.
my folder structure:
Project/
app/
static/
avatars/
Upload/
upload.py
my destination folder is "avatars" and my codes is in "Upload/upload.py" How could I get realpath to upload?
Sample codes
UPLOAD_FOLDER = 'app/static/avatars/'
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = 1 * 600 * 600
Error Message:
IOError: [Errno 2] No such file or directory: u'//app/static/avatars/002.png'
Thanks in advance!!