Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: support multipart uploads #3

Open
gcatlin opened this issue Jun 20, 2012 · 3 comments
Open

Feature Request: support multipart uploads #3

gcatlin opened this issue Jun 20, 2012 · 3 comments

Comments

@gcatlin
Copy link

gcatlin commented Jun 20, 2012

I'm trying to get plupload-java-runtime working with django (using mod_python), which doesn't appear to support non-multipart uploads containing binary data.

The main Plupload runtimes support a boolean configuration option "multipart" that, when enabled, uses mutlipart instead of direct binary streams. (source: http://www.plupload.com/documentation.php)

Please add this functionality to plupload-java-runtime.

Thanks!

@jakobadam
Copy link
Owner

I think you can handle data in any encoding by using Django's handle_raw_input method.

https://docs.djangoproject.com/en/dev/topics/http/file-uploads/

@gcatlin
Copy link
Author

gcatlin commented Jun 21, 2012

It's silly, but if the request's content type is not multipart, django won't ever call handle_raw_input. Here's a walk through some of the relevant code:

https://github.com/django/django/blob/master/django/http/__init__.py#L315
https://github.com/django/django/blob/master/django/http/__init__.py#L275
https://github.com/django/django/blob/master/django/http/multipartparser.py#L58

@gcatlin
Copy link
Author

gcatlin commented Jun 25, 2012

I eventually figured out how to create Django middleware to handle an application/octet-stream upload: https://gist.github.com/2989928

As a result, this is no longer a pressing need for me, but I still think it is a valid feature request in that it will improve compatibility with the other Plupload runtimes. So I'll leave it up to you, @jakobadam, to decided if this issued should be closed or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants