You Are Here:

Community: Developer Discussion Boards

#1 Old How to upload huge files from Nokia 95 to webserver? - 2009-11-04, 01:40

Join Date: Sep 2009
Posts: 1
snehal.chennuru
Offline
Registered User
I'm trying to upload a huge file from my Nokia N95 mobile to my webserver using Pys60 python code. However the code crashes because I'm trying to load the file into memory and trying to post to a HTTP url. Any idea how to upload huge files > 120 MB to webserver using Pys60.

Following is the code I use to send the HTTP request.

Code:
    f = open(soundpath + audio_filename)
    fields = [('timestamp', str(audio_start_time)), ('test_id', str(test_id)), ('tester_name', tester_name), ('sensor_position', str(sensor_position)), ('sensor', 'audio') ]
    files = [('data', audio_filename, f.read())]
    post_multipart(MOBILE_CONTEXT_HOST, MOBILE_CONTEXT_SERVER_PORT, '/MobileContext/AudioServlet', fields, files)
    f.close
Reply With Quote

#2 Old Re: How to upload huge files from Nokia 95 to webserver? - 2009-11-04, 05:53

Join Date: Feb 2008
Posts: 2,545
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Online
Forum Nokia Champion
hello snehal.chennuru

i am not sure this is going to help in some sense but why dont you try sending the whole data in chunks. Means why dont you divide the whole 120 mb of data.

I think we have some examples at the wiki you can go through that.

Hope that helps you.

Best of luck.


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

Forum Nokia Python Wiki


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

#3 Old Re: How to upload huge files from Nokia 95 to webserver? - 2009-11-04, 20:33

Join Date: Nov 2007
Posts: 319
Location: Sertaozinho/Brazil
Send a message via MSN to marcelobarrosalmeida Send a message via Skype™ to marcelobarrosalmeida
marcelobarrosalmeida's Avatar
marcelobarrosalmeida
Offline
Forum Nokia Champion
Hi snehal.chennuru

Moreover, the maximum upload size is a configuration parameter for the script language running in your webserver (PHP, for instance).

So, even you have memory in your phone, you may have problems in your webserver. Another idea: you can think about an specific app just for uploading instead using an web service.


Marcelo Barros
Nokia E71, N800, N95 and XM 5800
http://www.croozeus.com
http://wordmobi.wordpress.com
http://jedizone.wordpress.com
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
Nokia N-Series Complete Model Line-Up Dopod General Discussion 6 2008-07-22 21:16
Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working mattbee Mobile Java Tools & SDKs 1 2003-06-10 12:43
Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug? kauppi Mobile Java Tools & SDKs 3 2003-04-07 10:05

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