| Reply | « Previous Thread | Next Thread » |
|
Hi guys,
import httplib, urllib, e32, appuifw def send_data(): #function to send the data to the server. f=open('e:/file1.txt','rt') test1=f.read() params = urllib.urlencode({'data': test1}) headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"} conn = httplib.HTTPConnection("www.myadd.com") conn.request("POST", "/pys60/set_txt.php", params, headers) conn.close() e32.ao_yield() appuifw.note(u"Data sent", "info") def quit(): #exit function script_lock.signal() appuifw.app.menu = [(u"send data", send_data)] appuifw.app.exit_key_handler = quit script_lock = e32.Ao_lock() script_lock.wait() this is the code i am using for data sending from pys60 to server. the problem is i am not able to send data more than about 1 mb at a time. i want to send more data around 5-10 mb can somebody help me Thanks Cyan ! |
|
Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
hello mt.jijo
whats the error you are getting when you are sending that huge amount of data to the server. Actually long ago i also faced that sort of problem when uploading some photos using Python but that was my connection problem. ![]() So what error you are getting?? regards Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
hi Gaba,
i am getting a connetion timed out error when i tried with 5 mb of data but it works fine for 1 mb and less is there any data limit for httpconnection? Thanks Cyan ! |
|
Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
|
Quote:
oh i guess that is a connectivity problem only but i am not aware of the limitations of httplib when it comes to uploading of data. BTW if you are uploading some sort of images or higher size data then you need a different php script at the server. Moreover there are some more methods at the wiki which help in uploading the data, do check them. ![]() Regards Gaba88 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 all !
Two suggestions:
I dont know if we have such limit in urllib ... searching ... Marcelo Barros Nokia E71, N800, N95 and XM 5800 http://www.croozeus.com http://wordmobi.wordpress.com http://jedizone.wordpress.com |
|
Quote:
- max_execution_time - max_input_time - post_max_size - upload_max_filesize Other web servers may have similar limits. -- Aapo Rista http://code.google.com/p/pys60gps/ http://opennetmap.org/ |
|
Hi,
Its not the probelm in http connection .If u r using gprs then its not possible to send heavy size of data . |
| lalitendu_panda |
| View Public Profile |
| Find all posts by lalitendu_panda |
|
Hi mt.jijo,
You have to send data over server chunks by chunks it mean you have to fixed chunk size like 100 KB or so on. hope this may be help. Pavan Pareta http://www.croozeus.com/started.htm |
| pavan.pareta |
| View Public Profile |
| Find all posts by pavan.pareta |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| J2ME encrypt C# decrypt | josual | Mobile Java Networking & Messaging & Security | 13 | 2008-10-20 05:29 |
| suckho, i have encontered the same problems. Could you tell me how you resolved it? | dicson_hu | Symbian Networking & Messaging | 4 | 2005-12-09 11:56 |
| unable to send data to imported functions in a dll | popeye_luck | General Symbian C++ | 4 | 2005-09-13 08:18 |
| Using Bluetooth to send data to a nokia 6310 and then sending it over http | studentproject | Bluetooth Technology | 1 | 2002-11-01 09:51 |
| Unable to Send SMS | abhishekmishra | General Symbian C++ | 1 | 2002-05-23 15:11 |