plupload-java-runtime icon indicating copy to clipboard operation
plupload-java-runtime copied to clipboard

Feature Request: support multipart uploads

Open gcatlin opened this issue 12 years ago • 3 comments

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!

gcatlin avatar Jun 20 '12 20:06 gcatlin

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/

jakobadam avatar Jun 21 '12 08:06 jakobadam

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 avatar Jun 21 '12 15:06 gcatlin

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.

gcatlin avatar Jun 25 '12 17:06 gcatlin