UrlRequest to Upload Image

4 views
Skip to first unread message

markiep...@gmail.com

unread,
Jan 21, 2018, 10:05:37 PM1/21/18
to Kivy users support
picpath = '/Users/Markie/DEsktop/ALLCONTENTS/Kingston_USB/sandhya1.mp4'
user,passw = 'Administrator','mypass'
todays = '20-01-2030'
params = {
"u" : user,
"p" : passw,
"t" : todays,
"f":"makru.jpg",
'upload':open(picpath,'rb')
}

def CallMe(x,y):
print y
headers= {'Content-Type': 'multipart/form-data'} #{'Content-Type':'multipart/form-data'}
UrlRequest(url=pcurl,on_success=CallMe,req_body=params,req_head=headers)



-- I would like to ask what is the problem uploading image, i tried urllib2 and it worked but i cant get it to work cuz it blocks the UI thats why i would like to upload image through UrlRequest, Everything works but everytime i check the server there is no image (None).
Reply all
Reply to author
Forward
0 new messages