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")})
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")})