开发者

Uploading multiple files in Django through one form field

开发者 https://www.devze.com 2022-12-10 20:00 出处:网络
Is there any custom widget (or a special magic way) to upload multiple files (or a whole folder!) through one form field?

Is there any custom widget (or a special magic way) to upload multiple files (or a whole folder!) through one form field? I have tried this multifile widget but it uses many s开发者_JAVA百科imple FileFileds.


HTML 5 now allows for multiple file uploads in a single form control.

http://www.w3.org/TR/html-markup/input.file.html#input.file.attrs.multiple


https://github.com/tstone/django-uploadify is a reusable Django app that integrates http://uploadify.com.

From Uploadify's website:

Uploadify is a jQuery plugin that integrates a fully-customizable multiple file upload utility on your website. It uses a mixture of Javascript, ActionScript, and any server-side language to dynamically create an instance over any DOM element on a page.


No, you can't do that - HTML file inputs don't allow it.


As Daniel said, File Input fields cannot support more than one file. However, there are ways around this using Things like SWFUpload. How you might integrate that workflow into a Django application, I'm not too sure.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号