(my apologies if you already saw this question on django-developers,
I'm reposting here because it's more a users question)

I was wondering if anyone else on the list has layered a RESTful
service into their django applications. I'm adding an atompub
interface to an existing django project, and I'd like to offer the
ability to POST and PUT to URIs. Part of my problem is that this
service needs to handle large (many megabyte) file uploads, so the
POST and PUT message body needs to be streamed to disk, rather than
held in memory.

I took a look at the FileUpload functionality in
django.http.HttpRequest and
django.http.multipartparser.MultiPartParser, and it looked like I
could slot in custom handlers as long as the content was POSTed with a
mimetype of "multipart/form-data". Unfortunately I am wanting to allow
clients to POST and PUT arbitrary content (application/zip,
application/atom+xml, etc).

At the moment I'm rolling my own code to read from request.environ
['wsgi.input'] but I'm worried that I'm not handling everything
correctly, and am wondering if there exists middleware for handling
this sort of scenario in a cleaner way. Or perhaps there's a more
django-y way of doing it?

Any info/pointers/tips would be appreciated.

//Ed

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to