I’m inserting a picture file like my.png to a database(table with a column settings of blob) but i want to display the amount of data sent like live update .
Example
<code>
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”)
</code>
<code>
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”)
</code>
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 out put be like
sending 1mb/5mb
sending 2mb/5mb
sending 4mb/5mb
sent 5mb/5mb