求助关于Ext.ux.UploadDialog上传文件的

javaVScsharp 2010-10-14 07:26:46
今天搞了下文件上传出了两个问题:
第一:上传小文件时(大约1M多)能上传成功,但是火狐浏览器说上传失败(其实已经上传到服务器了)ie没有什么问题

如图:火狐:
IE:

第二:当文件稍微大点时(我只试了试3M的)不管火狐还是IE都上传失败,就连后台都没进去

 function insertImages()
{
dialog = new Ext.ux.UploadDialog.Dialog({
url: '/WebOffice/upload.action',

width : 450,
height : 300,
minWidth : 450,
minHeight : 300,
draggable : true,
resizable : true,
modal: true,

reset_on_hide: true,
allow_close_on_upload: true,
upload_autostart: false
});

dialog.show('show-button');

...全文
200 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wfiufvfmqj 2011-04-20
  • 打赏
  • 举报
回复
兄弟,跟你一样滴问题
Configuration. Most configuration options are inherited from Ext.Window (see ExtJs docs). The added ones are: url - the url where to post uploaded files. base_params - additional post params (default to {}). permitted_extensions - array of file extensions which are permitted to upload (default to []). reset_on_hide - whether to reset upload queue on dialog hide or not (default true). allow_close_on_upload - whether to allow hide/close dialog during upload process (default false). upload_autostart - whether to start upload automaticaly when file added or not (default false). post_var_name - uploaded data POST variable name (defaults to 'file'). Events. filetest - fires before file is added into the queue, parameters: dialog - reference to dialog filename - file name If handler returns false then file will not be queued. fileadd - fires when file is added into the queue, parameters: dialog - reference to dialog filename - file name fileremove - fires when file is removed from the queue, parameters: dialog - reference to dialog filename - file name record - file record resetqueue - fires when upload queue is resetted, parameters: dialog - reference to dialog beforefileuploadstart - fires when file as about to start uploading: dialog - reference to dialog filename - uploaded file name record - file record If handler returns false then file upload will be canceled. fileuploadstart - fires when file has started uploading: dialog - reference to dialog filename - uploaded file name record - file record uploadsuccess - fires when file is successfuly uploaded, parameters: dialog - reference to dialog filename - uploaded file name data - js-object builded from json-data returned from upload handler response. record - file record uploaderror - fires when file upload error occured, parameters: dialog - reference to dialog filename - uploaded file name data - js-object builded from json-data returned from upload handler response. record - file record uploadfailed - fires when file upload failed, parameters: dialog - reference to dialog filename - failed file name record - file record uploadcanceled - fires when file upload canceled, parameters: dialog - reference to dialog filename - failed file name record - file record uploadstart - fires when upload process starts, parameters: dialog - reference to dialog uploadstop - fires when upload process stops, parameters: dialog - reference to dialog uploadcomplete - fires when upload process complete (no files to upload left), parameters: dialog - reference to dialog Public methods Better go see the source. I18n. The class is ready for i18n, override the Ext.ux.UploadDialog.Dialog.prototype.i18n object with your language strings, or just pass i18n object in config. Server side handler. The files in the queue are posted one at a time, the file field name is 'file'. The handler should return json encoded object with following properties:

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧