Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import base64
- @users_blueprint.route('/add-source', methods=['GET', 'POST'])
- @ensure_authenticated
- @user_authenticated
- def add_user_resource():
- file = request.files['file']
- #file = request.files['file'].filename
- with open(file, "rb") as imageFile:
- str = base64.b64encode(imageFile.read())
- print str
- #FileNotFoundError: [Errno 2] No such file or directory: 'Tulips.jpg'
Add Comment
Please, Sign In to add comment