Well are you doing that in a page request? Is it timing out?
Also if you are doing this with large files its going to eat memory
and processing power like you couldn't believe. I would hand this off
to another service or daemon, or in my case Celery to do the work.
On Oct 19, 10:58 am, Pradnya wrote:
> 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-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.