Exemple #1
0
def upload():

    if 'Filedata' in request.files:
        filename = photos.save(request.files['Filedata'])
        return json.dumps({'imgUrl':photos.url(filename)})

    return json.dumps({'error':_("Please select a picture")})
Exemple #2
0
def upload():

    if 'Filedata' in request.files:
        filename = photos.save(request.files['Filedata'])
        return json.dumps({'imgUrl': photos.url(filename)})

    return json.dumps({'error': _("Please select a picture")})