| Reply | « Previous Thread | Next Thread » |
|
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
|
| snehal.chennuru |
| View Public Profile |
| Find all posts by snehal.chennuru |
|
Join Date: Feb 2008
Posts: 2,545
Location: Bhavnagar, Gujarat, India
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 |
|
Join Date: Nov 2007
Posts: 319
Location: Sertaozinho/Brazil
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |