You Are Here:

Community: Developer Discussion Boards

#1 Old Uploaded Bytes? - 2008-08-24, 21:59

Join Date: Aug 2008
Posts: 6
Location: Malaysia
Nem-Fdc
Offline
Registered User
Hello, is there any ways to detect the bytes percents of the uploaded files, and showing the percents at the application?
Reply With Quote

#2 Old Re: Uploaded Bytes? - 2008-08-24, 22:08

Join Date: Oct 2007
Posts: 2,845
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Hi and welcome to the Forum Nokia discussion boards.

Please see if this thread answers your question.
Reply With Quote

#3 Old Re: Uploaded Bytes? - 2008-08-24, 23:20

Join Date: Aug 2008
Posts: 6
Location: Malaysia
Nem-Fdc
Offline
Registered User
Thanks for that info, but i think that only work for ftplib.. if we use httplib to upload files, how can we know the uploaded bytes?
Reply With Quote

#4 Old Re: Uploaded Bytes? - 2008-08-25, 05:01

Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by Nem-Fdc View Post
Thanks for that info, but i think that only work for ftplib.. if we use httplib to upload files, how can we know the uploaded bytes?
Hi Nem-Fdc
i think we dont have anything in the httplib that can tell us about the uploaded bytes. But i am not sure and will feel happy if proven wrong.

Enjoy Pythoning
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#5 Old Re: Uploaded Bytes? - 2008-08-25, 05:43

Join Date: Aug 2008
Posts: 6
Location: Malaysia
Nem-Fdc
Offline
Registered User
Oh ya? I suggest the next PyS60 version has added those function for httplib/urllib, so we can knew the bytes of downloading and uploading progress.
Last edited by Nem-Fdc : 2008-08-25 at 05:51. Reason: Edit
Reply With Quote

#6 Old Re: Uploaded Bytes? - 2008-08-25, 05:50

Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by Nem-Fdc View Post
Oh ya? I suggest the next PyS60 version has added those function for httplib/urllib,
yes i also hope so but you can definitely give a feature request.

Enjoy Pythoning
gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#7 Old Re: Uploaded Bytes? - 2008-08-25, 08:47

Join Date: Sep 2005
Posts: 314
Location: Finland, Helsinki
aaaaapo
Offline
Regular Contributor
Quote:
Originally Posted by Nem-Fdc View Post
Hello, is there any ways to detect the bytes percents of the uploaded files, and showing the percents at the application?
Mikko Ohtamaa has made a little helper, which allows you to set a callback function which gets called after SEND_BUFFER_SIZE bytes are sent:

http://discussion.forum.nokia.com/fo...67&postcount=2

Code:
def send_callback(action, bytes_done, bytes_total, current_filename):
   print "Sending %s %d/%d" % (bytes_done, bytes_total, current_filename)

post_multipart(host, selector, fields, files, send_callback)
Reply With Quote

#8 Old Re: Uploaded Bytes? - 2008-08-26, 10:43

Join Date: Aug 2008
Posts: 6
Location: Malaysia
Nem-Fdc
Offline
Registered User
Quote:
Originally Posted by aaaaapo View Post
Mikko Ohtamaa has made a little helper, which allows you to set a callback function which gets called after SEND_BUFFER_SIZE bytes are sent:

http://discussion.forum.nokia.com/fo...67&postcount=2

Code:
def send_callback(action, bytes_done, bytes_total, current_filename):
   print "Sending %s %d/%d" % (bytes_done, bytes_total, current_filename)

post_multipart(host, selector, fields, files, send_callback)
soon i test the code, I guest it will working.. but how if we running two applications with the same access point, are the bytes of the two applications will be counted together like the Connection Manager?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling RTP padding bytes abhilash_1984 Open C/C++ 5 2008-06-26 08:42
SOS:accept bytes of a jpg file from the J2EE,but losing some bytes. jerrysdfha Symbian Networking & Messaging 1 2007-01-31 02:39
Reading given number of bytes with RSocket::Read() luweiewul Symbian Networking & Messaging 1 2005-07-15 06:57
Nokia 30 SMS sending problem !!!!! pgredelj General Messaging 1 2004-01-12 13:48
Loading Image data from 'raw' bytes LongSteve Mobile Java General 2 2002-11-20 18:38

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia