Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~663 People Reached
Favorite Forums
Favorite Tags
Member Avatar for Sponge_2

images = [createProductForm.productImageModel.data, createProductForm.productImageModel.data] for image in images: if image.filename == '': print('Image must have a filename') return redirect(url_for('createProduct')) if not allowed_image(image.filename): print('Image extension is not allowed') return redirect(url_for('createProduct')) else: filename = secure_filename(image.filename) file_path = image.save(os.path.join(app.config['IMAGE_UPLOADS'], filename)) print(mysql.format(file_path)) mysql.connection.commit() print("Hello yes!") print("images saved") If i were to convert the image …

0
31
Member Avatar for Sponge_2

Hi, How do i store files into blob datatype into mysql via user input with python? def read_file(filename): #Convert digital data to binary format with open(filename, 'wb') as f: photo = f.read() return photo @app.route('/createProduct', methods=['GET', 'POST']) def createProduct(): createProductForm = CreateProductForm() msg = '' if request.method == 'POST' and …

Member Avatar for AndreRet
0
632