Passing file to .net web service
Hello
I am using Django 1.1 and Python 2.6
I want to pass file ot file byte array to a web serrvice which is
written in .net, so I am using
import urllib2
import urllib2_file
data = [ ('fileName' , 'test.txt'), ('file', open'/tmp/test.text',
'r') ]
data=urllib.urlencode(data)
req=urllib2.Request(URL, data,headers)
u = urllib2.urlopen(req)
here URL is the .net web service url
and it is throwing error as "The request was aborted: The request was
canceled."
If tried without sending file or binary data it works fine.
Is there any other way I can upload the file or send file to .net web
service?
Please suggest.
Thanks
Pradnya
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home