blueimp jQuery的文件上传没有Ajax [英] blueimp jQuery-File-Upload without ajax

查看:133
本文介绍了blueimp jQuery的文件上传没有Ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很喜欢客户端处理选择文件和预览选项取消或删除。

然而,我想上传页面形式,我不需要使用Ajax。我一直在摆弄所有的选项,我不能找到反正张贴与同步选择的文件形式。

是否有可能得到data.files张贴与您可以使用blueimp jQuery-File-Upload通过标准表单提交文件,通过设置replaceFileInput选项来提交文件。 false。



从文档:


默认情况下,文件输入字段在每个
输入字段更改事件后被替换为一个克隆。这是iframe传输队列
所必需的,并允许为相同的文件选择触发更改事件,但可以通过将此选项设置为false来禁用



I really love the client side processing of selecting a file and having a preview with the option to cancel or delete.

However i want to upload the page with a form and i don't need to use ajax. I have been fiddling with all the options and i cant find anyway to post to form with the files selected synchronously.

Is it possible to get data.files to post with the form?

解决方案

You can submit files through a standard form submit using the blueimp jQuery-File-Upload by setting the replaceFileInput option to false.

From the documentation:

By default, the file input field is replaced with a clone after each input field change event. This is required for iframe transport queues and allows change events to be fired for the same file selection, but can be disabled by setting this option to false

这篇关于blueimp jQuery的文件上传没有Ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆