我不知道是否可能,但我想在将其上传到图书馆后显示图片。 一旦我想级联serializeFileUpload我得到一个错误,方法注释也声明serializeFileUpload可能是唯一的回调。 到目前为止我的代码:
[2] => Array
(
[0] => 2
[id] => 2
[1] => DERIVED
[select_type] => DERIVED
[2] => province_create
[table] => province_create
[3] => ALL
[type] => ALL
[4] => kk,province,kkk
[possible_keys] => kk,province,kkk
[5] =>
[key] =>
[6] =>
[key_len] =>
[7] =>
[ref] =>
[8] => 261
[rows] => 261
[9] => Using where; Using temporary
[Extra] => Using where; Using temporary
)
[3] => Array
(
[0] => 2
[id] => 2
[1] => DERIVED
[select_type] => DERIVED
[2] => basic_data
[table] => basic_data
[3] => ref
[type] => ref
[4] => PRIMARY,kk,kkk,k,parish
[possible_keys] => PRIMARY,kk,kkk,k,parish
[5] => kk
[key] => kk
[6] => 56
[key_len] => 56
[7] => databaseuser.province_create.province
[ref] => databaseuser.province_create.province
[8] => 39
[rows] => 39
[9] => Using index; Distinct
[Extra] => Using index; Distinct
)
[4] => Array
(
[0] => 2
[id] => 2
[1] => DERIVED
[select_type] => DERIVED
[2] => att2
[table] => att2
[3] => ref
[type] => ref
[4] => indpull,mmm
[possible_keys] => indpull,mmm
[5] => mmm
[key] => mmm
[6] => 57
[key_len] => 57
[7] => databaseuser.basic_data.id
[ref] => databaseuser.basic_data.id
[8] => 1
[rows] => 1
[9] => Using where; Distinct
[Extra] => Using where; Distinct
)
有没有办法让jQuery用上传的图像替换#fileUpload?
由于
最高
JQAjax中的实现>> serializeFileUpload:aQuery
html fileUpload
...
id: #fileUpload;
onChange: (html jQuery ajax
serializeFileUpload: (html jQuery id: inputString ));
callback: [ :f | self handleNewFile: f]
答案 0 :(得分:3)
您是否尝试过使用ajax onsucces回调?
(html jQuery ajax
...
onSuccess: ((html jQuery id: #fileUpload) replaceWith: [:r | ... ]))