I’m inserting an image file like my.png into a database (table with a column settings of blob) but I want to display the amount of data sent like live update.
Example
import threading
import pymysql
connection = pymysql.connect(something)
cursor = connection.cursor()
cursor.executive(“ insert into memes(img, name) values (?, '1.jpg')”,file)
while sent_data=!”5mb”:
print(“sending “+sent_data+”/5mb”)
print(“sent 5mb/5mb”)
So the output will be like this:
sending 1mb/5mb
sending 2mb/5mb
sending 4mb/5mb
sent 5mb/5mb